diff --git a/main.go b/main.go index 8553d79..ac4235c 100644 --- a/main.go +++ b/main.go @@ -127,7 +127,7 @@ func main() { } if flag.NArg() != 1 { - fmt.Fprintf(os.Stderr, Usage) + fmt.Fprint(os.Stderr, Usage) flag.PrintDefaults() os.Exit(2) } diff --git a/output.go b/output.go index 6ba7889..c8f137b 100644 --- a/output.go +++ b/output.go @@ -35,9 +35,10 @@ func printOutput( ) ([]byte, error) { var groupType, groupPkg bool for _, g := range groupBy { - if g == "pkg" { + switch g { + case "pkg": groupPkg = true - } else if g == "type" { + case "type": groupType = true } } @@ -285,7 +286,7 @@ func printOutput( Attrs: dotAttrs{ "penwidth": "0.8", "fontsize": "16", - "label": fmt.Sprintf("%s", label), + "label": label, "style": "filled", "fillcolor": "lightyellow", "URL": fmt.Sprintf("/?f=%s", key),