mirror of
https://github.com/moul/sshportal.git
synced 2024-11-10 09:12:49 +08:00
Merge pull request #466 from Doozers/fix/isma/fix-lint
chore: fix golangci-lint on CI
This commit is contained in:
commit
672ef1724e
3 changed files with 6 additions and 5 deletions
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
@ -20,9 +20,9 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: lint
|
- name: lint
|
||||||
uses: golangci/golangci-lint-action@v2.5.2
|
uses: golangci/golangci-lint-action@v3
|
||||||
with:
|
with:
|
||||||
version: v1.38
|
version: v1.50.1
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
tests-on-windows:
|
tests-on-windows:
|
||||||
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors
|
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors
|
||||||
|
|
|
@ -47,7 +47,7 @@ linters:
|
||||||
- staticcheck
|
- staticcheck
|
||||||
- structcheck
|
- structcheck
|
||||||
#- stylecheck
|
#- stylecheck
|
||||||
- typecheck
|
#- typecheck
|
||||||
- unconvert
|
- unconvert
|
||||||
- unparam
|
- unparam
|
||||||
- unused
|
- unused
|
||||||
|
|
|
@ -14,10 +14,11 @@ import (
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
"gorm.io/gorm/logger"
|
"gorm.io/gorm/logger"
|
||||||
|
|
||||||
|
"moul.io/sshportal/pkg/bastion"
|
||||||
|
|
||||||
"github.com/gliderlabs/ssh"
|
"github.com/gliderlabs/ssh"
|
||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
gossh "golang.org/x/crypto/ssh"
|
gossh "golang.org/x/crypto/ssh"
|
||||||
"moul.io/sshportal/pkg/bastion"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type serverConfig struct {
|
type serverConfig struct {
|
||||||
|
@ -83,7 +84,7 @@ func dbConnect(c *serverConfig, config gorm.Option) (*gorm.DB, error) {
|
||||||
func server(c *serverConfig) (err error) {
|
func server(c *serverConfig) (err error) {
|
||||||
// configure db logging
|
// configure db logging
|
||||||
|
|
||||||
db, err := dbConnect(c, &gorm.Config{
|
db, _ := dbConnect(c, &gorm.Config{
|
||||||
Logger: logger.Default.LogMode(logger.Silent),
|
Logger: logger.Default.LogMode(logger.Silent),
|
||||||
})
|
})
|
||||||
sqlDB, err := db.DB()
|
sqlDB, err := db.DB()
|
||||||
|
|
Loading…
Reference in a new issue