diff options
| author | Jeff Carr <[email protected]> | 2025-10-15 19:40:02 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-15 19:40:02 -0500 |
| commit | 0c6082d44c7fbf46d8d44d50972d9f3302414d5b (patch) | |
| tree | 41ea632858bd34b4cfc2881d60e3baf727f35097 /generateHeader.go | |
| parent | e1631e272166f3cd490e993c32d307f1e634f5a4 (diff) | |
add a sort header
Diffstat (limited to 'generateHeader.go')
| -rw-r--r-- | generateHeader.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/generateHeader.go b/generateHeader.go index 78fb359..d961646 100644 --- a/generateHeader.go +++ b/generateHeader.go @@ -53,6 +53,23 @@ func header(w io.Writer, pf *File) { fmt.Fprintln(w, "") } +func headerSort(w io.Writer, pf *File) { + // header must come first + headerComment(w) + fmt.Fprintf(w, "package %s\n", pf.Package) + fmt.Fprintln(w, "") + fmt.Fprintln(w, "import (") + fmt.Fprintln(w, " \"fmt\"") + fmt.Fprintln(w, " \"iter\"") + fmt.Fprintln(w, " \"sort\"") + fmt.Fprintln(w, " \"sync\"") + fmt.Fprintln(w, "") + fmt.Fprintln(w, " \"go.wit.com/lib/config\"") + fmt.Fprintln(w, " \"google.golang.org/protobuf/proto\"") + fmt.Fprintln(w, ")") + fmt.Fprintln(w, "") +} + func (pb *File) addNewFunc(w io.Writer) { var STRUCT string = pb.Bases.Name var UUID string = pb.Uuid |
