Skip to content

Commit

Permalink
feat: update go proj template
Browse files Browse the repository at this point in the history
  • Loading branch information
pplmx committed Jan 31, 2024
1 parent c25fa61 commit 87826fb
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 10 deletions.
16 changes: 14 additions & 2 deletions template/go/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ on:
workflow_dispatch:

jobs:
todo:
name: TODO
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 'stable'

- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...
2 changes: 1 addition & 1 deletion template/go/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: help
.DEFAULT_GOAL := help

APP_NAME := go
APP_NAME := {{project-name}}

# build image
image:
Expand Down
20 changes: 13 additions & 7 deletions template/go/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
# {{project-name}}

[![Crates.io](https://img.shields.io/crates/v/{{project-name}}.svg)](https://crates.io/crates/{{project-name}})
[![Docs.rs](https://docs.rs/{{project-name}}/badge.svg)](https://docs.rs/{{project-name}})
[![CI](https://github.com/{{gh_uname}}/{{project-name}}/workflows/CI/badge.svg)](https://github.com/{{gh_uname}}/{{project-name}}/actions)
[![Coverage Status](https://coveralls.io/repos/github/{{gh_uname}}/{{project-name}}/badge.svg?branch=main)](https://coveralls.io/github/{{gh_uname}}/{{project-name}}?branch=main)

## Installation
## Usage

### Cargo
```bash
# run the server
make run

* Install the rust toolchain in order to have cargo installed by following
[this](https://www.rust-lang.org/tools/install) guide.
* run `cargo install {{project-name}}`
# build the binary
make build

# run with docker compose
make up

# stop docker compose
make down
```

## License

Expand Down

0 comments on commit 87826fb

Please sign in to comment.