mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
Add 'auto-generated' notices (#66)
This commit is contained in:
parent
4eaa16b8d1
commit
27cd0610d1
11
genkeys.go
11
genkeys.go
@ -74,6 +74,8 @@ func init() {
|
|||||||
|
|
||||||
const ebitenKeysTmpl = `{{.License}}
|
const ebitenKeysTmpl = `{{.License}}
|
||||||
|
|
||||||
|
// {{.Notice}}
|
||||||
|
|
||||||
package ebiten
|
package ebiten
|
||||||
|
|
||||||
|
|
||||||
@ -93,6 +95,8 @@ const (
|
|||||||
|
|
||||||
const uiKeysTmpl = `{{.License}}
|
const uiKeysTmpl = `{{.License}}
|
||||||
|
|
||||||
|
// {{.Notice}}
|
||||||
|
|
||||||
package ui
|
package ui
|
||||||
|
|
||||||
type Key int
|
type Key int
|
||||||
@ -105,6 +109,8 @@ const (
|
|||||||
|
|
||||||
const uiKeysGlfwTmpl = `{{.License}}
|
const uiKeysGlfwTmpl = `{{.License}}
|
||||||
|
|
||||||
|
// {{.Notice}}
|
||||||
|
|
||||||
// +build !js
|
// +build !js
|
||||||
|
|
||||||
package ui
|
package ui
|
||||||
@ -127,6 +133,8 @@ var glfwKeyCodeToKey = map[glfw.Key]Key{
|
|||||||
|
|
||||||
const uiKeysJSTmpl = `{{.License}}
|
const uiKeysJSTmpl = `{{.License}}
|
||||||
|
|
||||||
|
// {{.Notice}}
|
||||||
|
|
||||||
// +build js
|
// +build js
|
||||||
|
|
||||||
package ui
|
package ui
|
||||||
@ -223,6 +231,8 @@ func main() {
|
|||||||
lines := strings.Split(string(l), "\n")
|
lines := strings.Split(string(l), "\n")
|
||||||
license := "// " + strings.Join(lines[:len(lines)-1], "\n// ")
|
license := "// " + strings.Join(lines[:len(lines)-1], "\n// ")
|
||||||
|
|
||||||
|
notice := "DO NOT EDIT: This file is auto-generated by genkeys.go."
|
||||||
|
|
||||||
names := []string{}
|
names := []string{}
|
||||||
namesWithoutMods := []string{}
|
namesWithoutMods := []string{}
|
||||||
codes := []int{}
|
codes := []int{}
|
||||||
@ -255,6 +265,7 @@ func main() {
|
|||||||
// NOTE: According to godoc, maps are automatically sorted by key.
|
// NOTE: According to godoc, maps are automatically sorted by key.
|
||||||
tmpl.Execute(f, map[string]interface{}{
|
tmpl.Execute(f, map[string]interface{}{
|
||||||
"License": license,
|
"License": license,
|
||||||
|
"Notice": notice,
|
||||||
"KeyCodeToName": keyCodeToName,
|
"KeyCodeToName": keyCodeToName,
|
||||||
"Codes": codes,
|
"Codes": codes,
|
||||||
"KeyNames": names,
|
"KeyNames": names,
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
|
// DO NOT EDIT: This file is auto-generated by genkeys.go.
|
||||||
|
|
||||||
package ui
|
package ui
|
||||||
|
|
||||||
type Key int
|
type Key int
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
|
// DO NOT EDIT: This file is auto-generated by genkeys.go.
|
||||||
|
|
||||||
// +build !js
|
// +build !js
|
||||||
|
|
||||||
package ui
|
package ui
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
|
// DO NOT EDIT: This file is auto-generated by genkeys.go.
|
||||||
|
|
||||||
// +build js
|
// +build js
|
||||||
|
|
||||||
package ui
|
package ui
|
||||||
|
2
keys.go
2
keys.go
@ -12,6 +12,8 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
|
// DO NOT EDIT: This file is auto-generated by genkeys.go.
|
||||||
|
|
||||||
package ebiten
|
package ebiten
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
Loading…
Reference in New Issue
Block a user