Skip to content
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/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.57.1
version: v1.62.2

fmt:
name: fmt
Expand Down
4 changes: 3 additions & 1 deletion pkg/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ func assertMatches(t *testing.T, expected, src []string) {

func pgVersion() (int, int) {
var major, minor int
fmt.Sscanf(os.Getenv("PGVERSION"), "%d.%d", &major, &minor)
if _, err := fmt.Sscanf(os.Getenv("PGVERSION"), "%d.%d", &major, &minor); err != nil {
log.Println("[warn] unable to read value of PGVERSION env var")
}
return major, minor
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/client/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ var (
// Example: 10.2.3.1 -> 10.2
func getMajorMinorVersion(str string) (major int, minor int) {
chunks := strings.Split(str, ".")
fmt.Sscanf(chunks[0], "%d", &major)
fmt.Sscanf(chunks[0], "%d", &major) //nolint
if len(chunks) > 1 {
fmt.Sscanf(chunks[1], "%d", &minor)
fmt.Sscanf(chunks[1], "%d", &minor) //nolint
}
return
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/connection/connection_string.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func lookupPassword(opts command.Options, url *neturl.URL) string {

if url != nil {
var dbName string
fmt.Sscanf(url.Path, "/%s", &dbName)
fmt.Sscanf(url.Path, "/%s", &dbName) //nolint

return passfile.FindPassword(
url.Hostname(),
Expand Down
Loading