Filippo Valsorda пре 5 година
родитељ
комит
1f0796c926
2 измењених фајлова са 5 додато и 4 уклоњено
  1. 2 1
      .travis.yml
  2. 3 3
      main.go

+ 2 - 1
.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"

+ 3 - 3
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 {