Skip to content

dnnrly/goclitem

Go CLI Template

This is a template for Go CLI tools. Major features are:

  1. Setup script
  2. Release build action
  3. PR validation action
  4. Code of Conduct
  5. Basic security policy
  6. Modules enabled
  7. Rudimentary accepance tests

Setup

  1. Create a new repo from this template
  2. $ ./setup.sh
  3. Follow the prompts

Use the -d option to see what will be modified without changing any files.

You can delete everything above this line afterwards.

Project Title

One Paragraph of project description goes here

GitHub release (latest SemVer) GitHub Workflow Status report card godoc

GitHub watchers GitHub stars Twitter URL

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

What things you need to build the software and how to install them:

tparse

tparse helps to turn verbose default Go testing output something more friendly.

go install github.com/mfridman/tparse@latest

golangci-lint

Instructions for installing the linter can be found here.

Installing

$ git clone http://github.com/dnnrly/goclitem.git
$ cd goclitem
$ make install

Running Unit Tests

$ make test

Running Acceptance tests

$ make deps
$ make build acceptance-test

Important make targets

  • acceptance-test - run acceptance tests
  • build - build the application
  • ci-test - ci target - run tests to generate coverage data
  • coverage-report - collate the coverage data
  • generate - generate mocks and other assets
  • help - print help message
  • lint - run linting with golangci-lint
  • test - run unit tests with tparse

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Your name here - Initial work - dnnrly

See also the list of contributors who participated in this project.

License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details

Acknowledgments

  • Important people here

About

A simple Go CLI project template

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published