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}}
|
||||
|
||||
// {{.Notice}}
|
||||
|
||||
package ebiten
|
||||
|
||||
|
||||
@ -93,6 +95,8 @@ const (
|
||||
|
||||
const uiKeysTmpl = `{{.License}}
|
||||
|
||||
// {{.Notice}}
|
||||
|
||||
package ui
|
||||
|
||||
type Key int
|
||||
@ -105,6 +109,8 @@ const (
|
||||
|
||||
const uiKeysGlfwTmpl = `{{.License}}
|
||||
|
||||
// {{.Notice}}
|
||||
|
||||
// +build !js
|
||||
|
||||
package ui
|
||||
@ -127,6 +133,8 @@ var glfwKeyCodeToKey = map[glfw.Key]Key{
|
||||
|
||||
const uiKeysJSTmpl = `{{.License}}
|
||||
|
||||
// {{.Notice}}
|
||||
|
||||
// +build js
|
||||
|
||||
package ui
|
||||
@ -223,6 +231,8 @@ func main() {
|
||||
lines := strings.Split(string(l), "\n")
|
||||
license := "// " + strings.Join(lines[:len(lines)-1], "\n// ")
|
||||
|
||||
notice := "DO NOT EDIT: This file is auto-generated by genkeys.go."
|
||||
|
||||
names := []string{}
|
||||
namesWithoutMods := []string{}
|
||||
codes := []int{}
|
||||
@ -255,6 +265,7 @@ func main() {
|
||||
// NOTE: According to godoc, maps are automatically sorted by key.
|
||||
tmpl.Execute(f, map[string]interface{}{
|
||||
"License": license,
|
||||
"Notice": notice,
|
||||
"KeyCodeToName": keyCodeToName,
|
||||
"Codes": codes,
|
||||
"KeyNames": names,
|
||||
|
@ -12,6 +12,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// DO NOT EDIT: This file is auto-generated by genkeys.go.
|
||||
|
||||
package ui
|
||||
|
||||
type Key int
|
||||
|
@ -12,6 +12,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// DO NOT EDIT: This file is auto-generated by genkeys.go.
|
||||
|
||||
// +build !js
|
||||
|
||||
package ui
|
||||
|
@ -12,6 +12,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// DO NOT EDIT: This file is auto-generated by genkeys.go.
|
||||
|
||||
// +build js
|
||||
|
||||
package ui
|
||||
|
Loading…
Reference in New Issue
Block a user