From 1f0796c9266088357894ebd6570af235c36c81f6 Mon Sep 17 00:00:00 2001 From: Filippo Valsorda <1225294+FiloSottile@users.noreply.github.com> Date: Fri, 5 Jul 2019 01:41:23 -0300 Subject: [PATCH] Add staticcheck to CI (#171) --- .travis.yml | 3 ++- main.go | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4374421..892a74d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,11 @@ language: go sudo: false go: stable -install: "# skip" +install: (cd && go get honnef.co/go/tools/cmd/staticcheck) script: - go vet + - staticcheck ./... - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o "mkcert-$(git describe --tags)-linux-amd64" - CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build -o "mkcert-$(git describe --tags)-linux-arm" - CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o "mkcert-$(git describe --tags)-darwin-amd64" diff --git a/main.go b/main.go index bddecce..4232bb5 100644 --- a/main.go +++ b/main.go @@ -92,13 +92,13 @@ func main() { p12FileFlag = flag.String("p12-file", "", "") ) flag.Usage = func() { - fmt.Fprintf(flag.CommandLine.Output(), shortUsage) + fmt.Fprint(flag.CommandLine.Output(), shortUsage) fmt.Fprintln(flag.CommandLine.Output(), `For more options, run "mkcert -help".`) } flag.Parse() if *helpFlag { - fmt.Fprintf(flag.CommandLine.Output(), shortUsage) - fmt.Fprintf(flag.CommandLine.Output(), advancedUsage) + fmt.Fprint(flag.CommandLine.Output(), shortUsage) + fmt.Fprint(flag.CommandLine.Output(), advancedUsage) return } if *carootFlag {