summaryrefslogtreecommitdiff
path: root/header.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-08 19:45:48 -0600
committerJeff Carr <[email protected]>2025-01-08 19:45:48 -0600
commit3fe2fde185b950215008e67a50364ec741f2fd09 (patch)
tree25392d9c486a324afe61239d54b5e4395d3a3000 /header.go
parent0a1eb821e9123f4e6793b410300803c610d4b804 (diff)
make a protofile for the app itself
that turns out to be a lot of fun!
Diffstat (limited to 'header.go')
-rw-r--r--header.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/header.go b/header.go
index 1d18e91..6c38fed 100644
--- a/header.go
+++ b/header.go
@@ -6,7 +6,8 @@ import (
)
func headerComment(w io.Writer) {
- fmt.Fprintln(w, "")
+ // technically this should be the first line and in this exact format:
+ fmt.Fprintln(w, "// Code generated by go.wit.com/apps/autogenpb. DO NOT EDIT.")
fmt.Fprintln(w, "// This file was autogenerated with autogenpb", VERSION, "DO NOT EDIT")
fmt.Fprintln(w, "// go install go.wit.com/apps/autogenpb@latest")
fmt.Fprintln(w, "//")
@@ -23,8 +24,9 @@ func headerComment(w io.Writer) {
}
func header(w io.Writer, names map[string]string) {
- fmt.Fprintln(w, "package "+names["package"])
+ // header must come first
headerComment(w)
+ fmt.Fprintln(w, "package "+names["package"])
fmt.Fprintln(w, "import (")
fmt.Fprintln(w, " \"fmt\"")
fmt.Fprintln(w, " \"sort\"")