add Go lint

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero
2022-07-16 20:21:11 +08:00
parent cc13492623
commit ac23def893
60 changed files with 576 additions and 194 deletions
+28
View File
@@ -0,0 +1,28 @@
name: Lint
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
GO_VERSION: 1.18
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Checkout code
uses: actions/checkout@v3
- name: Golangci lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.46.2