generated from atomicgo/template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 20fc8a5
Showing
17 changed files
with
504 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
changelog: | ||
exclude: | ||
labels: | ||
- ignore-for-release | ||
authors: | ||
- octocat | ||
categories: | ||
- title: Breaking Changes 🛠 | ||
labels: | ||
- breaking | ||
- title: Exciting New Features 🎉 | ||
labels: | ||
- feature | ||
- title: Fixes 🔧 | ||
labels: | ||
- fix | ||
- title: Other Changes | ||
labels: | ||
- "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
_extends: .github | ||
|
||
repository: | ||
# See https://developer.github.com/v3/repos/#edit for all available settings. | ||
|
||
# A short description of the repository that will show up on GitHub | ||
description: 📦 Template repository for AtomicGo repositories | ||
|
||
# A comma-separated list of topics to set on the repository | ||
topics: atomicgo, hacktoberfest, go, golang, golang-library | ||
|
||
# Either `true` to make the repository private, or `false` to make it public. | ||
private: false | ||
|
||
# Either `true` to enable issues for this repository, `false` to disable them. | ||
has_issues: true | ||
|
||
# Either `true` to enable projects for this repository, or `false` to disable them. | ||
# If projects are disabled for the organization, passing `true` will cause an API error. | ||
has_projects: false | ||
|
||
# Either `true` to enable the wiki for this repository, `false` to disable it. | ||
has_wiki: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: AtomicGo | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
docs: | ||
if: "!contains(github.event.head_commit.message, 'autoupdate')" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Update Docs | ||
uses: atomicgo/ci@main | ||
env: | ||
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | ||
TERM: xterm-256color |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Go | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest, windows-latest, macos-latest ] | ||
steps: | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1 | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: Get dependencies | ||
run: go get -v -t -d ./... | ||
|
||
- name: Build | ||
run: go build -v . | ||
|
||
- name: Test | ||
run: go test -coverprofile="coverage.txt" -covermode=atomic -v -p 1 . | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Code Analysis | ||
|
||
on: [ push, pull_request ] | ||
|
||
jobs: | ||
lint: | ||
if: "!contains(github.event.head_commit.message, 'autoupdate')" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 'stable' | ||
|
||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Tweet release | ||
|
||
# Listen to the `release` event | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
tweet: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: Eomm/why-don-t-you-tweet@v1 | ||
# We don't want to tweet if the repository is not a public one | ||
if: ${{ !github.event.repository.private }} | ||
with: | ||
tweet-message: "New ${{ github.event.repository.name }} release: ${{ github.event.release.tag_name }}! 🎉 | ||
Try it out: ${{ github.event.release.html_url }} | ||
#go #golang #opensource #library #release #atomicgo" | ||
env: | ||
TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }} | ||
TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }} | ||
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }} | ||
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Go template | ||
|
||
## Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
## Test binary, built with `go test -c` | ||
*.test | ||
|
||
## Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
## Dependency directories (remove the comment below to include it) | ||
vendor/ | ||
|
||
# IDEs | ||
|
||
## IntelliJ | ||
.idea | ||
*.iml | ||
out | ||
gen | ||
|
||
## Visual Studio Code | ||
.vscode | ||
*.code-workspace | ||
|
||
# Operating System Files | ||
|
||
## macOS | ||
### General | ||
.DS_Store | ||
|
||
# Other | ||
|
||
## Experimenting folder | ||
experimenting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
linters-settings: | ||
gocritic: | ||
enabled-tags: | ||
- diagnostic | ||
- experimental | ||
- opinionated | ||
- performance | ||
- style | ||
disabled-checks: | ||
- dupImport | ||
- ifElseChain | ||
- octalLiteral | ||
- whyNoLint | ||
- wrapperFunc | ||
- exitAfterDefer | ||
- hugeParam | ||
- ptrToRefParam | ||
- paramTypeCombine | ||
- unnamedResult | ||
linters: | ||
disable-all: true | ||
enable: | ||
# default linters | ||
- errcheck | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- staticcheck | ||
- typecheck | ||
- unused | ||
# additional linters | ||
- asasalint | ||
- asciicheck | ||
- bidichk | ||
- bodyclose | ||
- containedctx | ||
- contextcheck | ||
- decorder | ||
- dupl | ||
- durationcheck | ||
- errchkjson | ||
- errname | ||
- errorlint | ||
- exhaustive | ||
# - exhaustruct | ||
- exportloopref | ||
- forcetypeassert | ||
- gocheckcompilerdirectives | ||
- gocritic | ||
- godot | ||
- godox | ||
- goerr113 | ||
- gofmt | ||
- goprintffuncname | ||
- gosec | ||
- gosmopolitan | ||
- importas | ||
- ireturn | ||
- nakedret | ||
- nestif | ||
- nilerr | ||
- nilnil | ||
- prealloc | ||
- predeclared | ||
- revive | ||
- rowserrcheck | ||
- tagalign | ||
- tenv | ||
- thelper | ||
- tparallel | ||
- unconvert | ||
- unparam | ||
- usestdlibvars | ||
- wastedassign | ||
- whitespace | ||
- wrapcheck | ||
- wsl | ||
- gocyclo | ||
- misspell | ||
issues: | ||
include: | ||
- EXC0012 | ||
- EXC0014 | ||
exclude-rules: | ||
- path: _test\.go | ||
linters: | ||
- gocyclo | ||
- errcheck | ||
- dupl | ||
- gosec | ||
- gocritic | ||
- linters: | ||
- gocritic | ||
text: "unnecessaryDefer:" | ||
- linters: | ||
- gocritic | ||
text: "preferDecodeRune:" | ||
service: | ||
golangci-lint-version: 1.53.x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Marvin Wendt (MarvinJWendt) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.