From 78bfce745b3a966e34c8468eabf925c43167ae44 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 9 Jan 2025 05:20:00 -0600 Subject: all functions are passed the informationn in the protobuf --- header.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'header.go') 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\"") -- cgit v1.2.3