diff --git a/.github/workflows/golangci.yml b/.github/workflows/golangci.yml index c6fa9ef..09ea880 100644 --- a/.github/workflows/golangci.yml +++ b/.github/workflows/golangci.yml @@ -18,12 +18,12 @@ jobs: with: go-version-file: go.mod - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v6 with: # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version - version: v1.54 + version: v1.61 args: --timeout=10m - + # Optional: working directory, useful for monorepos # working-directory: somedir diff --git a/db/rdb.go b/db/rdb.go index c589564..4e0a38b 100644 --- a/db/rdb.go +++ b/db/rdb.go @@ -166,9 +166,7 @@ func (r *RDBDriver) MigrateDB() error { } } case dialectMysql, dialectPostgreSQL: - if err != nil { - return xerrors.Errorf("Failed to migrate. err: %w", err) - } + return xerrors.Errorf("Failed to migrate. err: %w", err) default: return xerrors.Errorf("Not Supported DB dialects. r.name: %s", r.name) } diff --git a/git/git.go b/git/git.go index 6a6a67d..64aaffa 100644 --- a/git/git.go +++ b/git/git.go @@ -49,7 +49,7 @@ func (gc Config) CloneRepo(url, repoPath string) (map[string]struct{}, error) { return nil, err } - err = filepath.Walk(repoPath, func(path string, info os.FileInfo, err error) error { + err = filepath.Walk(repoPath, func(path string, info os.FileInfo, _ error) error { if info.IsDir() { return nil } @@ -73,8 +73,3 @@ func clone(url, repoPath string) error { } return nil } - -func generateGitArgs(repoPath string) []string { - gitDir := filepath.Join(repoPath, ".git") - return []string{"--git-dir", gitDir, "--work-tree", repoPath} -} diff --git a/go.mod b/go.mod index 11d9299..10c916e 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/vulsio/go-msfdb -go 1.20 +go 1.23 require ( github.com/cheggaaa/pb/v3 v3.1.5