diff options
| author | Jeff Carr <[email protected]> | 2025-01-08 19:45:48 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-01-08 19:45:48 -0600 |
| commit | 3fe2fde185b950215008e67a50364ec741f2fd09 (patch) | |
| tree | 25392d9c486a324afe61239d54b5e4395d3a3000 /header.go | |
| parent | 0a1eb821e9123f4e6793b410300803c610d4b804 (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.go | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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\"") |
