Skip to content

Refactor: Change util module to util package #1052

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Nov 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/manual-create-pd-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
ref: ${{ matrix.branch }}
- uses: actions/setup-go@v2
with:
go-version: "1.16.5"
go-version: "1.13.5"
- name: Update TiDB Dashboard in PD code base
run: |
go get -d "github.com/pingcap/tidb-dashboard@${{ github.event.inputs.release_version }}"
Expand Down
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
.env
/bin
/vendor
/util/vendor

# Binaries for programs and plugins
*.exe
Expand All @@ -16,9 +14,6 @@
# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
# vendor/

# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

Expand Down
57 changes: 35 additions & 22 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,51 @@ run:
- pkg/uiserver
timeout: 2m

linters-settings:
goimports:
local-prefixes: github.com/pingcap/tidb-dashboard
golint:
min-confidence: 0

issues:
include:
# Bring back all gosec checks
- EXC0006
- EXC0007
- EXC0008
- EXC0009
- EXC0010
exclude-rules:
# TODO: Current code base does not work well for these linters. We should bring back one by one.
- path: ^pkg/|^cmd/
linters:
- nestif
- exhaustive
- wastedassign
- errorlint

linters:
disable-all: true
enable:
- govet
- errcheck
- staticcheck
- unused
- gosimple
- structcheck
- varcheck
- ineffassign
- deadcode
- typecheck
- revive
- gosec
- unconvert
- goimports
# Additionally enable some checkers
- asciicheck
- depguard
- prealloc
- dogsled
- durationcheck
- errorlint
- exhaustive
- exportloopref
- godot
- gofmt
- goimports
- gosec
- importas
- nestif
- prealloc
- predeclared
- revive
- rowserrcheck
- sqlclosecheck
- unconvert
- wastedassign
- whitespace

linters-settings:
goimports:
local-prefixes: github.com/pingcap/tidb-dashboard
exhaustive:
# only cover the case when default is not given
default-signifies-exhaustive: true
21 changes: 13 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,35 @@ module github.com/pingcap/tidb-dashboard
go 1.13

require (
github.com/DATA-DOG/go-sqlmock v1.5.0
github.com/Masterminds/semver v1.5.0
github.com/ReneKroon/ttlcache/v2 v2.3.0
github.com/VividCortex/mysqlerr v0.0.0-20200629151747-c28746d985dd
github.com/VividCortex/mysqlerr v1.0.0
github.com/Xeoncross/go-aesctr-with-hmac v0.0.0-20200623134604-12b17a7ff502
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751
github.com/antonmedv/expr v1.9.0
github.com/appleboy/gin-jwt/v2 v2.6.3
github.com/cenkalti/backoff/v4 v4.0.2
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/fatih/structtag v1.2.0
github.com/gin-contrib/gzip v0.0.1
github.com/gin-gonic/gin v1.5.0
github.com/gin-gonic/gin v1.7.4
github.com/go-resty/resty/v2 v2.6.0
github.com/go-sql-driver/mysql v1.6.0
github.com/goccy/go-graphviz v0.0.5
github.com/golang-jwt/jwt v3.2.1+incompatible
github.com/google/pprof v0.0.0-20200407044318-7d83b28da2e9
github.com/google/uuid v1.0.0
github.com/gtank/cryptopasta v0.0.0-20170601214702-1f550f6f2f69
github.com/henrylee2cn/ameda v1.4.10
github.com/joho/godotenv v1.3.0
github.com/joomcode/errorx v1.0.1
github.com/minio/sio v0.3.0
github.com/oleiade/reflections v1.0.1
github.com/pingcap/check v0.0.0-20191216031241-8a5a85928f12
github.com/pingcap/errors v0.11.5-0.20200917111840-a15ef68f753d
github.com/pingcap/kvproto v0.0.0-20200411081810-b85805c9476c
github.com/pingcap/log v0.0.0-20210317133921-96f4fcab92a4
github.com/pingcap/sysutil v0.0.0-20210315073920-cc0985d983a3
github.com/pingcap/log v0.0.0-20210906054005-afc726e70354
github.com/pingcap/sysutil v0.0.0-20211108113841-e5c5906ed1e7
github.com/rs/cors v1.7.0
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 // indirect
github.com/shurcooL/httpgzip v0.0.0-20190720172056-320755c1c1b0
Expand All @@ -37,11 +41,12 @@ require (
github.com/swaggo/http-swagger v0.0.0-20200308142732-58ac5e232fba
github.com/swaggo/swag v1.6.6-0.20200529100950-7c765ddd0476
github.com/thoas/go-funk v0.8.0
github.com/vmihailenco/msgpack/v5 v5.0.0-beta.1
github.com/vmihailenco/msgpack/v5 v5.3.5
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738
go.uber.org/atomic v1.6.0
go.uber.org/atomic v1.9.0
go.uber.org/fx v1.10.0
go.uber.org/zap v1.16.0
go.uber.org/goleak v1.1.10
go.uber.org/zap v1.19.0
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
google.golang.org/grpc v1.25.1
Expand Down
Loading