# https://taskfile.dev version: '3' vars: GOBIN_ENV: sh: go env GOBIN GOPATH_ENV: sh: go env GOPATH BIN: '{{if .GOBIN_ENV}}{{.GOBIN_ENV}}{{else}}{{.GOPATH_ENV}}/bin{{end}}' tasks: default: desc: fmt, lint, test deps: - fmt - lint - test fmt: desc: Format go files sources: - "*.go" cmds: - go fmt ./... lint: desc: Statically analyze code sources: - '*.go' cmds: - golangci-lint run test: desc: Run all tests sources: - '*.go' cmds: - go test -cover -race .