Skip to content

Commit 7700a6c

Browse files
committed
Initial commit
0 parents  commit 7700a6c

File tree

6 files changed

+812
-0
lines changed

6 files changed

+812
-0
lines changed

.github/workflows/go.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Go
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [master]
7+
paths:
8+
- "**.go"
9+
- "go.mod"
10+
- "go.sum"
11+
pull_request:
12+
branches: [master]
13+
paths:
14+
- "**.go"
15+
- "go.mod"
16+
- "go.sum"
17+
18+
jobs:
19+
golangci:
20+
name: Lint
21+
runs-on: ubuntu-latest
22+
steps:
23+
# step 1: checkout repository code
24+
- name: Checkout code into workspace directory
25+
uses: actions/checkout@v4
26+
27+
# step 2: set up go
28+
- name: Set up Go
29+
uses: actions/setup-go@v5
30+
with:
31+
go-version: stable
32+
33+
# step 3: run golangci-lint
34+
- name: Run golangci-lint
35+
uses: golangci/golangci-lint-action@v7
36+
with:
37+
version: latest
38+
args: --timeout=5m
39+
40+
test:
41+
name: Test
42+
runs-on: ubuntu-latest
43+
steps:
44+
# step 1: checkout repository code
45+
- name: Checkout code into workspace directory
46+
uses: actions/checkout@v4
47+
48+
# step 2: set up go
49+
- name: Set up Go
50+
uses: actions/setup-go@v5
51+
with:
52+
go-version: stable
53+
54+
# step 3: install dependencies
55+
- name: Install all Go dependencies
56+
run: go mod download
57+
58+
# step 4: run test
59+
- name: Run coverage
60+
run: go test -race -coverprofile=coverage.out -covermode=atomic ./...
61+
62+
# step 5: upload coverage
63+
- name: Upload coverage to Codecov
64+
uses: codecov/codecov-action@v4
65+
with:
66+
token: ${{ secrets.CODECOV_TOKEN }}

.gitignore

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# File created using '.gitignore Generator' for Visual Studio Code: https://bit.ly/vscode-gig
2+
# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,macos,go,linux,windows
3+
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,macos,go,linux,windows
4+
5+
### Go ###
6+
# If you prefer the allow list template instead of the deny list, see community template:
7+
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
8+
#
9+
# Binaries for programs and plugins
10+
*.exe
11+
*.exe~
12+
*.dll
13+
*.so
14+
*.dylib
15+
16+
# Test binary, built with `go test -c`
17+
*.test
18+
19+
# Output of the go coverage tool, specifically when used with LiteIDE
20+
*.out
21+
22+
# Dependency directories (remove the comment below to include it)
23+
# vendor/
24+
25+
# Go workspace file
26+
go.work
27+
28+
### Linux ###
29+
*~
30+
31+
# temporary files which can be created if a process still has a handle open of a deleted file
32+
.fuse_hidden*
33+
34+
# KDE directory preferences
35+
.directory
36+
37+
# Linux trash folder which might appear on any partition or disk
38+
.Trash-*
39+
40+
# .nfs files are created when an open file is removed but is still being accessed
41+
.nfs*
42+
43+
### macOS ###
44+
# General
45+
.DS_Store
46+
.AppleDouble
47+
.LSOverride
48+
49+
# Icon must end with two \r
50+
Icon
51+
52+
# Thumbnails
53+
._*
54+
55+
# Files that might appear in the root of a volume
56+
.DocumentRevisions-V100
57+
.fseventsd
58+
.Spotlight-V100
59+
.TemporaryItems
60+
.Trashes
61+
.VolumeIcon.icns
62+
.com.apple.timemachine.donotpresent
63+
64+
# Directories potentially created on remote AFP share
65+
.AppleDB
66+
.AppleDesktop
67+
Network Trash Folder
68+
Temporary Items
69+
.apdisk
70+
71+
### macOS Patch ###
72+
# iCloud generated files
73+
*.icloud
74+
75+
### VisualStudioCode ###
76+
.vscode/*
77+
!.vscode/settings.json
78+
!.vscode/tasks.json
79+
!.vscode/launch.json
80+
!.vscode/extensions.json
81+
!.vscode/*.code-snippets
82+
83+
# Local History for Visual Studio Code
84+
.history/
85+
86+
# Built Visual Studio Code Extensions
87+
*.vsix
88+
89+
### VisualStudioCode Patch ###
90+
# Ignore all local history of files
91+
.history
92+
.ionide
93+
94+
### Windows ###
95+
# Windows thumbnail cache files
96+
Thumbs.db
97+
Thumbs.db:encryptable
98+
ehthumbs.db
99+
ehthumbs_vista.db
100+
101+
# Dump file
102+
*.stackdump
103+
104+
# Folder config file
105+
[Dd]esktop.ini
106+
107+
# Recycle Bin used on file shares
108+
$RECYCLE.BIN/
109+
110+
# Windows Installer files
111+
*.cab
112+
*.msi
113+
*.msix
114+
*.msm
115+
*.msp
116+
117+
# Windows shortcuts
118+
*.lnk
119+
120+
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,macos,go,linux,windows
121+
122+
# Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option)
123+

0 commit comments

Comments
 (0)