summaryrefslogtreecommitdiff
path: root/header.go
diff options
context:
space:
mode:
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\"")