Skip to content

Commit

Permalink
Merge pull request #316 from prometheus/mem/fix_linter_errors
Browse files Browse the repository at this point in the history
Fix linter errors
  • Loading branch information
roidelapluie committed Jul 23, 2021
2 parents a1b6ede + 08ac5ff commit 5f27aa2
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 11 deletions.
6 changes: 3 additions & 3 deletions config/http_config_test.go
Expand Up @@ -335,11 +335,11 @@ func TestNewClientFromConfig(t *testing.T) {
handler: func(w http.ResponseWriter, r *http.Request) {
switch r.URL.Path {
case "/redirected":
fmt.Fprintf(w, ExpectedMessage)
fmt.Fprint(w, ExpectedMessage)
default:
w.Header().Set("Location", "/redirected")
w.WriteHeader(http.StatusFound)
fmt.Fprintf(w, "It should follow the redirect.")
fmt.Fprint(w, "It should follow the redirect.")
}
},
}, {
Expand All @@ -359,7 +359,7 @@ func TestNewClientFromConfig(t *testing.T) {
default:
w.Header().Set("Location", "/redirected")
w.WriteHeader(http.StatusFound)
fmt.Fprintf(w, ExpectedMessage)
fmt.Fprint(w, ExpectedMessage)
}
},
},
Expand Down
2 changes: 1 addition & 1 deletion expfmt/decode_test.go
Expand Up @@ -21,7 +21,7 @@ import (
"strings"
"testing"

"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/proto" //nolint:staticcheck // Ignore SA1019. Need to keep deprecated package for compatibility.
dto "github.com/prometheus/client_model/go"

"github.com/prometheus/common/model"
Expand Down
2 changes: 1 addition & 1 deletion expfmt/encode.go
Expand Up @@ -18,7 +18,7 @@ import (
"io"
"net/http"

"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/proto" //nolint:staticcheck // Ignore SA1019. Need to keep deprecated package for compatibility.
"github.com/matttproud/golang_protobuf_extensions/pbutil"
"github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg"

Expand Down
5 changes: 3 additions & 2 deletions expfmt/encode_test.go
Expand Up @@ -15,10 +15,11 @@ package expfmt

import (
"bytes"
"github.com/golang/protobuf/proto"
dto "github.com/prometheus/client_model/go"
"net/http"
"testing"

"github.com/golang/protobuf/proto" //nolint:staticcheck // Ignore SA1019. Need to keep deprecated package for compatibility.
dto "github.com/prometheus/client_model/go"
)

func TestNegotiate(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion expfmt/openmetrics_create_test.go
Expand Up @@ -20,7 +20,7 @@ import (
"testing"
"time"

"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/proto" //nolint:staticcheck // Ignore SA1019. Need to keep deprecated package for compatibility.
"github.com/golang/protobuf/ptypes"

dto "github.com/prometheus/client_model/go"
Expand Down
2 changes: 1 addition & 1 deletion expfmt/text_create_test.go
Expand Up @@ -19,7 +19,7 @@ import (
"strings"
"testing"

"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/proto" //nolint:staticcheck // Ignore SA1019. Need to keep deprecated package for compatibility.

dto "github.com/prometheus/client_model/go"
)
Expand Down
2 changes: 1 addition & 1 deletion expfmt/text_parse.go
Expand Up @@ -24,7 +24,7 @@ import (

dto "github.com/prometheus/client_model/go"

"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/proto" //nolint:staticcheck // Ignore SA1019. Need to keep deprecated package for compatibility.
"github.com/prometheus/common/model"
)

Expand Down
2 changes: 1 addition & 1 deletion expfmt/text_parse_test.go
Expand Up @@ -18,7 +18,7 @@ import (
"strings"
"testing"

"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/proto" //nolint:staticcheck // Ignore SA1019. Need to keep deprecated package for compatibility.
dto "github.com/prometheus/client_model/go"
)

Expand Down

0 comments on commit 5f27aa2

Please sign in to comment.