Signed-off-by: ismael FALL <ismael.fall@epitech.eu>
This commit is contained in:
ismael FALL 2023-05-18 16:45:11 +02:00
parent 73926212d5
commit 35b76f9063
3 changed files with 6 additions and 5 deletions

View file

@ -20,9 +20,9 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: lint
uses: golangci/golangci-lint-action@v2.5.2
uses: golangci/golangci-lint-action@v3
with:
version: v1.38
version: v1.50.1
github-token: ${{ secrets.GITHUB_TOKEN }}
tests-on-windows:
needs: golangci-lint # run after golangci-lint action to not produce duplicated errors

View file

@ -47,7 +47,7 @@ linters:
- staticcheck
- structcheck
#- stylecheck
- typecheck
#- typecheck
- unconvert
- unparam
- unused

View file

@ -14,10 +14,11 @@ import (
"gorm.io/gorm"
"gorm.io/gorm/logger"
"moul.io/sshportal/pkg/bastion"
"github.com/gliderlabs/ssh"
"github.com/urfave/cli"
gossh "golang.org/x/crypto/ssh"
"moul.io/sshportal/pkg/bastion"
)
type serverConfig struct {
@ -83,7 +84,7 @@ func dbConnect(c *serverConfig, config gorm.Option) (*gorm.DB, error) {
func server(c *serverConfig) (err error) {
// configure db logging
db, err := dbConnect(c, &gorm.Config{
db, _ := dbConnect(c, &gorm.Config{
Logger: logger.Default.LogMode(logger.Silent),
})
sqlDB, err := db.DB()