Skip to content

Instantly share code, notes, and snippets.

View BastiPaeltz's full-sized avatar

Basti Pältz BastiPaeltz

  • Hamburg, Germany
View GitHub Profile
@h12w
h12w / goclean.sh
Last active August 24, 2021 03:13
golcean.sh does automatic checking on a Go package and its sub-packages.
#!/bin/bash
# The script does automatic checking on a Go package and its sub-packages, including:
# 1. gofmt (http://golang.org/cmd/gofmt/)
# 2. goimports (https://github.com/bradfitz/goimports)
# 3. golint (https://github.com/golang/lint)
# 4. go vet (http://golang.org/cmd/vet)
# 5. race detector (http://blog.golang.org/race-detector)
# 6. test coverage (http://blog.golang.org/cover)
set -e