-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from gotomicro/dev
准备 Release v0.0.1
- Loading branch information
Showing
20 changed files
with
762 additions
and
21 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 @@ | ||
# 开发中 |
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,32 @@ | ||
# Copyright 2021 gotomicro | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
version = 1 | ||
|
||
[[analyzers]] | ||
name = "go" | ||
enabled = true | ||
|
||
[analyzers.meta] | ||
import_root = "github.com/gotomicro/ego-kit" | ||
dependencies_vendored = false | ||
|
||
[[analyzers]] | ||
name = "test-coverage" | ||
enabled = true | ||
|
||
[[analyzers]] | ||
name = "sql" | ||
enabled = true | ||
|
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,34 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
**仅限中文** | ||
|
||
在提之前请先查找[已有 issues](https://github.com/gotomicro/eorm/issues),避免重复上报。 | ||
|
||
并且确保自己已经: | ||
- [ ] 阅读过文档 | ||
- [ ] 阅读过注释 | ||
- [ ] 阅读过例子 | ||
|
||
### 问题简要描述 | ||
|
||
### 复现步骤 | ||
> 请提供简单的复现代码 | ||
### 错误日志或者截图 | ||
|
||
### 你期望的结果 | ||
|
||
### 你排查的结果,或者你觉得可行的修复方案 | ||
> 可选。我们希望你能够尽量先排查问题,帮助我们减轻维护负担。这对于你个人能力提升同样是有帮助的。 | ||
### 你使用的是 ego-kit 哪个版本? | ||
|
||
### 你设置的的 Go 环境? | ||
> 上传 `go env` 的结果 |
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,26 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: feature | ||
assignees: '' | ||
|
||
--- | ||
|
||
**仅限中文** | ||
|
||
### 使用场景 | ||
|
||
### 行业分析 | ||
> 如果你知道有框架提供了类似功能,可以在这里描述,并且给出文档或者例子 | ||
### 可行方案 | ||
> 如果你有设计思路或者解决方案,请在这里提供。你可以提供多个方案,并且给出自己的选择 | ||
### 其它 | ||
> 任何你觉得有利于解决问题的补充说明 | ||
### 你使用的是 ego-kit 哪个版本? | ||
|
||
### 你设置的的 Go 环境? | ||
> 上传 `go env` 的结果 |
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,22 @@ | ||
--- | ||
name: Question | ||
about: Want to ask some questions | ||
title: '' | ||
labels: question | ||
--- | ||
|
||
**仅限中文** | ||
|
||
在提之前请先查找[已有 issues](https://github.com/gotomicro/eorm/issues),避免重复上报。 | ||
|
||
并且确保自己已经: | ||
- [ ] 阅读过文档 | ||
- [ ] 阅读过注释 | ||
- [ ] 阅读过例子 | ||
|
||
### 你的问题 | ||
|
||
### 你使用的是 ego-kit 哪个版本? | ||
|
||
### 你设置的的 Go 环境? | ||
> 上传 `go env` 的结果 |
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,58 @@ | ||
# Copyright 2021 gotomicro | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
run: | ||
timeout: 5m | ||
skip-files: | ||
- generated.* | ||
- gen.* | ||
|
||
issues: | ||
new: true | ||
|
||
linters: | ||
enable: | ||
- asciicheck | ||
- bodyclose | ||
- deadcode | ||
- depguard | ||
- gci | ||
- gocritic | ||
- gofmt | ||
- gofumpt | ||
- goimports | ||
- goprintffuncname | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- misspell | ||
- nilerr | ||
- rowserrcheck | ||
- staticcheck | ||
- structcheck | ||
- stylecheck | ||
- typecheck | ||
- unconvert | ||
- unused | ||
- unparam | ||
- varcheck | ||
- whitespace | ||
- errcheck | ||
# disable: | ||
|
||
linters-settings: | ||
gci: | ||
local-prefixes: github.com/gotomicro/ego-kit | ||
goimports: | ||
local-prefixes: github.com/gotomicro/ego-kit |
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,50 @@ | ||
#!/bin/sh | ||
# Copyright 2021 gotomicro | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# git test pre-push hook | ||
# | ||
# To use, store as .git/hooks/pre-push inside your repository and make sure | ||
# it has execute permissions. | ||
# | ||
# This script does not handle file names that contain spaces. | ||
|
||
# Pre-push configuration | ||
remote=$1 | ||
url=$2 | ||
echo >&2 "Try pushing $2 to $1" | ||
|
||
TEST="go test ./... -race -cover -failfast" | ||
LINTER="golangci-lint run" | ||
|
||
# Run test and return if failed | ||
printf "Running go test..." | ||
$TEST | ||
RESULT=$? | ||
if [ $RESULT -ne 0 ]; then | ||
echo >&2 "$TEST" | ||
echo >&2 "Check code to pass test." | ||
exit 1 | ||
fi | ||
|
||
# Run linter and return if failed | ||
printf "Running go linter..." | ||
$LINTER | ||
RESULT=$? | ||
if [ $RESULT -ne 0 ]; then | ||
echo >&2 "$LINTER" | ||
echo >&2 "Check code to pass linter." | ||
exit 1 | ||
fi | ||
|
||
exit 0 |
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,45 @@ | ||
# Copyright 2021 gotomicro | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
name: changelog | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened, labeled, unlabeled] | ||
branches: | ||
- develop | ||
- main | ||
|
||
jobs: | ||
changelog: | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.pull_request.labels.*.name, 'Skip Changelog')" | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Check for CHANGELOG changes | ||
run: | | ||
# Only the latest commit of the feature branch is available | ||
# automatically. To diff with the base branch, we need to | ||
# fetch that too (and we only need its latest commit). | ||
git fetch origin ${{ github.base_ref }} --depth=1 | ||
if [[ $(git diff --name-only FETCH_HEAD | grep CHANGELOG) ]] | ||
then | ||
echo "A CHANGELOG was modified. Looks good!" | ||
else | ||
echo "No CHANGELOG was modified." | ||
echo "Please add a CHANGELOG entry, or add the \"Skip Changelog\" label if not required." | ||
false | ||
fi |
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 @@ | ||
# Copyright 2021 gotomicro | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
name: Go | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.18 | ||
|
||
- name: Build | ||
run: go build -v ./... | ||
|
||
- name: Test | ||
run: go test -race -coverprofile=cover.out -v ./... | ||
|
||
- name: Post Coverage | ||
uses: codecov/codecov-action@v2 |
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,28 @@ | ||
# Copyright 2021 gotomicro | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
name: Check License Lines | ||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened, labeled, unlabeled] | ||
branches: | ||
- develop | ||
- main | ||
jobs: | ||
check-license-lines: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Check License Lines | ||
uses: kt3k/[email protected] |
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,33 @@ | ||
# Copyright 2021 gotomicro | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
name: Mark stale issues and pull requests | ||
|
||
on: | ||
schedule: | ||
- cron: "30 1 * * *" | ||
|
||
jobs: | ||
stale: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/stale@v4 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
stale-issue-message: 'This issue is inactive for a long time.' | ||
stale-pr-message: 'This PR is inactive for a long time' | ||
stale-issue-label: 'inactive-issue' | ||
stale-pr-label: 'inactive-pr' |
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 |
---|---|---|
|
@@ -13,3 +13,5 @@ | |
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
|
||
.idea |
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,5 @@ | ||
{ | ||
"**/*.go": "// Copyright 2021 gotomicro", | ||
"**/*.{yml,toml}": "# Copyright 2021 gotomicro" | ||
"**/*.sh": "# Copyright 2021 gotomicro" | ||
} |
Oops, something went wrong.