Skip to content

Commit

Permalink
perflints
Browse files Browse the repository at this point in the history
Signed-off-by: Raul Sevilla <rsevilla@redhat.com>
  • Loading branch information
rsevilla87 committed Apr 3, 2024
1 parent 90a338c commit 9d9ea25
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ linters:
- perfsprint
- bodyclose
- prealloc
- revive
- perfsprint
5 changes: 3 additions & 2 deletions cmd/hloader.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"errors"
"fmt"
"log"
"net/http"
Expand Down Expand Up @@ -32,12 +33,12 @@ func main() {
var pprof, http2, insecure, keepalive bool
var csv string
rootCmd := &cobra.Command{
Use: fmt.Sprintf(os.Args[0]),
Use: os.Args[0],
Short: "HTTP loader",
RunE: func(cmd *cobra.Command, args []string) error {
cmd.SilenceUsage = true
if requestRate > 0 && requestRate < connections {
return fmt.Errorf("request rate must be higher than connections")
return errors.New("request rate must be higher than connections")
}
if pprof {
go func() {
Expand Down

0 comments on commit 9d9ea25

Please sign in to comment.