Skip to content

Commit 6dbc96a

Browse files
authored
Initial commit
0 parents  commit 6dbc96a

File tree

14 files changed

+640
-0
lines changed

14 files changed

+640
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
12+
A clear and concise description of what the bug is.
13+
14+
**To Reproduce**
15+
16+
Steps to reproduce the behavior:
17+
1. Go to '...'
18+
2. Click on '....'
19+
3. Scroll down to '....'
20+
4. See error
21+
22+
**Expected behavior**
23+
24+
A clear and concise description of what you expected to happen.
25+
26+
**Screenshots**
27+
28+
If applicable, add screenshots to help explain your problem.
29+
30+
**Version:**
31+
32+
Please provide the version of {project_name} you are using.
33+
34+
**Environment:**
35+
36+
The output of `go env`.
37+
38+
**Additional context**
39+
40+
Add any other context about the problem here.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
12+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
13+
14+
**Describe the solution you'd like**
15+
16+
A clear and concise description of what you want to happen.
17+
18+
**Describe alternatives you've considered**
19+
20+
A clear and concise description of any alternative solutions or features you've considered.
21+
22+
**Additional context**
23+
24+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#### What type of PR is this?
2+
<!--
3+
Add one of the following kinds:
4+
5+
build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
6+
ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
7+
docs: Documentation only changes
8+
feat: A new feature
9+
optimize: A new optimization
10+
fix: A bug fix
11+
perf: A code change that improves performance
12+
refactor: A code change that neither fixes a bug nor adds a feature
13+
style: Changes that do not affect the meaning of the code (white space, formatting, missing semi-colons, etc)
14+
test: Adding missing tests or correcting existing tests
15+
chore: Changes to the build process or auxiliary tools and libraries such as documentation generation
16+
-->
17+
18+
#### Check the PR title.
19+
<!--
20+
The description of the title will be attached in Release Notes,
21+
so please describe it from user-oriented, what this PR does / why we need it.
22+
Please check your PR title with the below requirements:
23+
-->
24+
- [ ] This PR title match the format: \<type\>(optional scope): \<description\>
25+
- [ ] The description of this PR title is user-oriented and clear enough for others to understand.
26+
- [ ] Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. [User docs repo](https://github.com/cloudwego/cloudwego.github.io)
27+
28+
29+
#### (Optional) Translate the PR title into Chinese.
30+
31+
32+
#### (Optional) More detailed description for this PR(en: English/zh: Chinese).
33+
<!--
34+
Provide more detailed info for review(e.g., it's recommended to provide perf data if this is a perf type PR).
35+
-->
36+
en:
37+
zh(optional):
38+
39+
40+
#### (Optional) Which issue(s) this PR fixes:
41+
<!--
42+
Automatically closes linked issue when PR is merged.
43+
Eg: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
44+
-->
45+
46+
#### (optional) The PR that updates user documentation:
47+
<!--
48+
If the current PR requires user awareness at the usage level, please submit a PR to update user docs. [User docs repo](https://github.com/cloudwego/cloudwego.github.io)
49+
-->

.github/workflows/pr-check.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Pull Request Check
2+
3+
on: [ pull_request ]
4+
5+
jobs:
6+
compliant:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
11+
- name: Check License Header
12+
uses: apache/skywalking-eyes/[email protected]
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
16+
- name: Check Spell
17+
uses: crate-ci/typos@master
18+
19+
golangci-lint:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Set up Go
24+
uses: actions/setup-go@v5
25+
with:
26+
go-version: stable
27+
# for self-hosted, the cache path is shared across projects
28+
# and it works well without the cache of github actions
29+
# Enable it if we're going to use Github only
30+
cache: true
31+
32+
- name: Golangci Lint
33+
# https://golangci-lint.run/
34+
uses: golangci/golangci-lint-action@v6
35+
with:
36+
version: latest

.github/workflows/tests.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Tests
2+
3+
on: [ push, pull_request ]
4+
5+
jobs:
6+
unit-benchmark-test:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- name: Set up Go
11+
uses: actions/setup-go@v5
12+
with:
13+
go-version: stable
14+
15+
- name: Unit Test
16+
run: go test -race -covermode=atomic -coverprofile=coverage.out ./...
17+
18+
- name: Benchmark
19+
run: go test -bench=. -benchmem -run=none ./...
20+
21+
compatibility-test:
22+
strategy:
23+
matrix:
24+
go: [ "1.19", "1.20", "1.21", "1.22" ]
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v4
28+
- name: Set up Go
29+
uses: actions/setup-go@v5
30+
with:
31+
go-version: ${{ matrix.go }}
32+
cache: true # don't use cache for self-hosted runners
33+
- name: Unit Test
34+
run: go test -race -covermode=atomic ./...

.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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+
17+
# Go workspace file
18+
go.work
19+
go.work.sum
20+
21+
# env file
22+
.env
23+
24+
# the result of the go build
25+
output*
26+
output/*
27+
28+
# Files generated by IDEs
29+
.idea/
30+
*.iml
31+
32+
# Vim swap files
33+
*.swp
34+
35+
# Vscode files
36+
.vscode
37+

.golangci.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Options for analysis running.
2+
run:
3+
# include `vendor` `third_party` `testdata` `examples` `Godeps` `builtin`
4+
skip-dirs-use-default: true
5+
# output configuration options
6+
output:
7+
# Format: colored-line-number|line-number|json|tab|checkstyle|code-climate|junit-xml|github-actions
8+
formats: colored-line-number
9+
# All available settings of specific linters.
10+
# Refer to https://golangci-lint.run/usage/linters
11+
linters-settings:
12+
gofumpt:
13+
# Choose whether to use the extra rules.
14+
# Default: false
15+
extra-rules: true
16+
govet:
17+
# Disable analyzers by name.
18+
# Run `go tool vet help` to see all analyzers.
19+
disable:
20+
- stdmethods
21+
linters:
22+
enable:
23+
- gofumpt
24+
- goimports
25+
- gofmt
26+
disable:
27+
- errcheck
28+
- typecheck
29+
- deadcode
30+
- varcheck
31+
- staticcheck
32+
issues:
33+
exclude-use-default: true
34+
exclude-files:
35+
- ".*\\.mock\\.go$"
36+
exclude-dirs:

.licenserc.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
header:
2+
license:
3+
spdx-id: Apache-2.0
4+
copyright-owner: CloudWeGo Authors
5+
6+
paths:
7+
- '**/*.go'
8+
- '**/*.s'
9+
10+
comment: on-failure

0 commit comments

Comments
 (0)