Add 'auto-generated' notices (#66)

This commit is contained in:
Hajime Hoshi 2015-01-07 23:21:52 +09:00
parent 4eaa16b8d1
commit 27cd0610d1
5 changed files with 19 additions and 0 deletions

View File

@ -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,

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 ebiten
import (