Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

Commit f667401

Browse files
authored
Initial commit
0 parents  commit f667401

File tree

5 files changed

+109
-0
lines changed

5 files changed

+109
-0
lines changed

.github/workflows/go.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Go Test
2+
on:
3+
push:
4+
branches: [ master, feature/* ]
5+
pull_request:
6+
branches: [ master ]
7+
env:
8+
GOPROXY: "https://proxy.golang.org"
9+
10+
jobs:
11+
test:
12+
name: "go test"
13+
strategy:
14+
matrix:
15+
go-version: [ 1.16.x, 1.17.x, 1.18.x, 1.19.x, 1.20.x ]
16+
platform: [ ubuntu-latest, macos-latest, windows-latest ]
17+
runs-on: ${{ matrix.platform }}
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v3
22+
23+
- name: Install Go
24+
uses: actions/setup-go@v3
25+
with:
26+
go-version: ${{ matrix.go-version }}
27+
cache: true
28+
cache-dependency-path: ./go.sum
29+
- run: go version
30+
31+
- name: Run tests
32+
run: go test ./... -v -covermode=atomic -race -coverprofile=coverage.txt
33+
34+
- name: Upload coverage to Codecov
35+
uses: codecov/codecov-action@v3

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Binaries for programs and plugins
2+
*.exe
3+
*.exe~
4+
*.dll
5+
*.so
6+
*.dylib
7+
8+
# Test binary, built with `go test -c`
9+
*.test
10+
11+
# Output of the go coverage tool, specifically when used with LiteIDE
12+
*.out
13+
14+
# Dependency directories (remove the comment below to include it)
15+
vendor/
16+
.idea

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Go Packagist (https://github.com/flc1125, https://flc.io)
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# :package-name
2+
3+
[![Go Version](https://badgen.net/github/release/go-packagist/:package-name/stable)](https://github.com/go-packagist/:package-name/releases)
4+
[![GoDoc](https://pkg.go.dev/badge/github.com/go-packagist/:package-name)](https://pkg.go.dev/github.com/go-packagist/:package-name)
5+
[![codecov](https://codecov.io/gh/go-packagist/:package-name/branch/master/graph/badge.svg?token=5TWGQ9DIRU)](https://codecov.io/gh/go-packagist/:package-name)
6+
[![Go Report Card](https://goreportcard.com/badge/github.com/go-packagist/:package-name)](https://goreportcard.com/report/github.com/go-packagist/:package-name)
7+
[![tests](https://github.com/go-packagist/:package-name/actions/workflows/go.yml/badge.svg)](https://github.com/go-packagist/:package-name/actions/workflows/go.yml)
8+
[![MIT license](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)
9+
10+
## Installation
11+
12+
```bash
13+
go get github.com/go-packagist/:package-name
14+
```
15+
16+
## Usage
17+
18+
```go
19+
// TODO: Write usage instructions
20+
```
21+
22+
## License
23+
24+
The MIT License (MIT). Please see [License File](LICENSE) for more information.

codecov.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
coverage:
2+
require_ci_to_pass: true
3+
4+
status:
5+
project:
6+
default:
7+
target: 90%
8+
threshold: 50%
9+
10+
patch:
11+
default:
12+
target: 90%
13+
threshold: 80%

0 commit comments

Comments
 (0)