Skip to content

Commit 67e89ed

Browse files
committed
init commit
0 parents  commit 67e89ed

File tree

113 files changed

+11583
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+11583
-0
lines changed

.github/dependabot.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: gomod
5+
directory: /
6+
labels:
7+
- dependencies
8+
schedule:
9+
interval: daily
10+
11+
- package-ecosystem: "github-actions"
12+
directory: "/"
13+
labels:
14+
- dependencies
15+
schedule:
16+
interval: "daily"

.github/workflows/go.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build and Test
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
pull_request:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
version: ["stable"]
16+
steps:
17+
- name: Check out repository
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Go
21+
uses: actions/setup-go@v5
22+
with:
23+
go-version: ${{ matrix.version }}
24+
cache: true
25+
26+
- name: Install Task
27+
uses: arduino/setup-task@v1
28+
with:
29+
version: 3.x
30+
repo-token: ${{ secrets.GITHUB_TOKEN }}
31+
32+
- name: generate and test
33+
run: |
34+
task github-action
35+
36+
- uses: codecov/codecov-action@v4
37+
env:
38+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
39+
with:
40+
files: ./coverage.out # optional
41+
flags: unittests # optional
42+
name: codecov-umbrella # optional
43+
fail_ci_if_error: false # optional (default = false)
44+
verbose: false # optional (default = false)

.gitignore

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
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,linux,go
3+
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,linux,go
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+
go.work.sum
28+
29+
### Linux ###
30+
*~
31+
32+
# temporary files which can be created if a process still has a handle open of a deleted file
33+
.fuse_hidden*
34+
35+
# KDE directory preferences
36+
.directory
37+
38+
# Linux trash folder which might appear on any partition or disk
39+
.Trash-*
40+
41+
# .nfs files are created when an open file is removed but is still being accessed
42+
.nfs*
43+
44+
### VisualStudioCode ###
45+
.vscode/*
46+
!.vscode/settings.json
47+
!.vscode/tasks.json
48+
!.vscode/launch.json
49+
!.vscode/extensions.json
50+
!.vscode/*.code-snippets
51+
52+
# Local History for Visual Studio Code
53+
.history/
54+
55+
# Built Visual Studio Code Extensions
56+
*.vsix
57+
58+
### VisualStudioCode Patch ###
59+
# Ignore all local history of files
60+
.history
61+
.ionide
62+
63+
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,linux,go
64+
65+
# Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option)
66+
67+
.task

.vscode/launch.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
// 使用 IntelliSense 了解相关属性。
3+
// 悬停以查看现有属性的描述。
4+
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Launch generate",
9+
"type": "go",
10+
"request": "launch",
11+
"mode": "auto",
12+
"cwd": "${workspaceFolder}",
13+
"program": "./cmd/kod",
14+
"args": "generate ./... ./tests/..."
15+
},
16+
{
17+
"name": "Launch struct2interface",
18+
"type": "go",
19+
"request": "launch",
20+
"mode": "auto",
21+
"cwd": "${workspaceFolder}",
22+
"program": "./cmd/kod",
23+
"args": "struct2interface tests"
24+
},
25+
]
26+
}

.vscode/settings.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"go.testFlags": [
3+
"-v",
4+
"-coverpkg=github.com/go-kod/kod/..."
5+
]
6+
}

0 commit comments

Comments
 (0)