Skip to content

conijnio/sample-go-cli-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample Go CLI Tool

Go Version License Maintenance Workflow: go Workflow: goreleaser Release Go Report Card

Template repository for Golang projects.

Prerequisites

You will need to install the following tools to successfully run the make targets:

go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
go install github.com/uudashr/gocognit/cmd/gocognit@latest
go install honnef.co/go/tools/cmd/staticcheck@latest
go install github.com/go-critic/go-critic/cmd/gocritic@latest

Commands

  • make build, builds the project.
  • make complexity, perform complexity scans on the codebase.
  • make coverage, create and displays the code coverage report in HTML.
  • make help, displays all the available options.
  • make lint, performs linting actions on the codebase.
  • make test, runs all the unit tests.

Run goreleaser locally

Because we enabled signing you need to supply a GPG_FINGERPRINT environment variable. You will be prompted for a passphrase.

GPG_FINGERPRINT=C490C64E6938FD0C goreleaser release --snapshot --clean

Afterward, you can validate the signature using the following command:

gpg --verify [Signature] [File]

License

This project is free and open source software licensed under the Apache 2.0 License.