Skip to content

Commit

Permalink
corrections for passing linter tests
Browse files Browse the repository at this point in the history
  • Loading branch information
IsThisEvenCode committed Jun 12, 2024
1 parent e1b9740 commit d841575
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/gearman_top/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func main() {
// Parse the flags in the custom FlagSet
err := flagSet.Parse(os.Args[1:])
if err != nil {
fmt.Fprintf(os.Stderr, "Error parsing flags -> %w: %s", err, err.Error())
fmt.Fprintf(os.Stderr, "Error parsing flags -> %s", err.Error())
os.Exit(1)
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/modgearman/gearman_top.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func generateQueueTable(ogHostname string, connectionMap map[string]net.Conn) st
if err != nil {
return fmt.Sprintf("---- %s:%d ----\n%s\n\n", hostName, port, err)
}
if queueList == nil || len(queueList) == 0 {
if len(queueList) == 0 {
return fmt.Sprintf("---- %s:%d ----\nNo queues have been found at host %s\n\n", hostName, port, hostName)
}

Expand All @@ -242,7 +242,7 @@ func determinePort(address string) (int, error) {
case 2:
port, err := strconv.Atoi(addressParts[1])
if err != nil {
return -1, fmt.Errorf("Error converting port %s to int -> %w", address, err)
return -1, fmt.Errorf("error converting port %s to int -> %w", address, err)
}

return port, nil
Expand Down
1 change: 1 addition & 0 deletions pkg/modgearman/statusAdmin.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func processGearmanQueues(address string, connectionMap map[string]net.Conn) ([]

if len(parts) == 2 && parts[0] == "OK" {
version = parts[1]

continue
}

Expand Down

0 comments on commit d841575

Please sign in to comment.