summaryrefslogtreecommitdiff
path: root/header.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-09 05:20:00 -0600
committerJeff Carr <[email protected]>2025-01-09 05:20:00 -0600
commit78bfce745b3a966e34c8468eabf925c43167ae44 (patch)
treedf1c4716b2014be1ceed1c0165314ddc493ce4ab /header.go
parente6a332962833dadce26748bd3f2fc436a44b0200 (diff)
all functions are passed the informationn in the protobuf
Diffstat (limited to 'header.go')
-rw-r--r--header.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/header.go b/header.go
index 6c38fed..3b267dc 100644
--- a/header.go
+++ b/header.go
@@ -23,10 +23,11 @@ func headerComment(w io.Writer) {
fmt.Fprintln(w, "")
}
-func header(w io.Writer, names map[string]string) {
+func header(w io.Writer, pf *File) {
// header must come first
headerComment(w)
- fmt.Fprintln(w, "package "+names["package"])
+ fmt.Fprintf(w, "package %s\n", pf.Package)
+ fmt.Fprintln(w, "")
fmt.Fprintln(w, "import (")
fmt.Fprintln(w, " \"fmt\"")
fmt.Fprintln(w, " \"sort\"")