Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/trstringer/go-template-cli-simple

Go template for a simple CLI
https://github.com/trstringer/go-template-cli-simple

Last synced: 10 days ago
JSON representation

Go template for a simple CLI

Awesome Lists containing this project

README

        

# Simple CLI Go template

Quickly create the boilerplate for a simple Go CLI.

## Usage

This requires `gonew`:

```bash
go install golang.org/x/tools/cmd/gonew@latest
```

Create your CLI:

```
gonew github.com/trstringer/go-template-cli-simple your-domain.com/your-project
```

Or to use a specific version/ref of the upstream template:

```
gonew github.com/trstringer/go-template-cli-simple@ your-domain.com/your-project
```

The new project/module is created in the project directory:

```
cd ./your-project
```

Run setup:

```
make setup
```

## Tests

Run unit tests:

```
make test
```

Run e2e tests:

```
make e2e
```