Skip to content

Commit fbd4bea

Browse files
committed
fix lint
1 parent 6301f54 commit fbd4bea

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

cmd/internal/tools_file_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2013,10 +2013,10 @@ func TestMergeToolsFiles(t *testing.T) {
20132013
}
20142014

20152015
testCases := []struct {
2016-
name string
2017-
files []ToolsFile
2018-
want ToolsFile
2019-
wantErr bool
2016+
name string
2017+
files []ToolsFile
2018+
want ToolsFile
2019+
wantErr bool
20202020
errString string
20212021
}{
20222022
{
@@ -2038,9 +2038,9 @@ func TestMergeToolsFiles(t *testing.T) {
20382038
wantErr: true,
20392039
},
20402040
{
2041-
name: "merge multiple mcp enabled generic",
2042-
files: []ToolsFile{fileMcp1, fileMcp2},
2043-
wantErr: true,
2041+
name: "merge multiple mcp enabled generic",
2042+
files: []ToolsFile{fileMcp1, fileMcp2},
2043+
wantErr: true,
20442044
errString: "multiple authServices with mcpEnabled=true detected",
20452045
},
20462046
{

internal/auth/generic/generic.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ func (a AuthService) GetClaimsFromHeader(ctx context.Context, h http.Header) (ma
126126

127127
parts := strings.Split(authHeader, " ")
128128
if len(parts) != 2 || strings.ToLower(parts[0]) != "bearer" {
129-
return nil, fmt.Errorf("Authorization header format must be Bearer {token}")
129+
return nil, fmt.Errorf("authorization header format must be Bearer {token}")
130130
}
131131
tokenString := parts[1]
132132

internal/auth/generic/generic_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func setupJWKSMockServer(t *testing.T, key *rsa.PrivateKey, keyID string) *httpt
4444
jwksHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
4545
if r.URL.Path == "/.well-known/openid-configuration" {
4646
w.Header().Set("Content-Type", "application/json")
47-
json.NewEncoder(w).Encode(map[string]interface{}{
47+
_ = json.NewEncoder(w).Encode(map[string]interface{}{
4848
"issuer": "https://example.com",
4949
"jwks_uri": "http://" + r.Host + "/jwks",
5050
})
@@ -62,7 +62,7 @@ func setupJWKSMockServer(t *testing.T, key *rsa.PrivateKey, keyID string) *httpt
6262
t.Fatalf("failed to create JWK: %v", err)
6363
}
6464
w.Header().Set("Content-Type", "application/json")
65-
json.NewEncoder(w).Encode(map[string]interface{}{
65+
_ = json.NewEncoder(w).Encode(map[string]interface{}{
6666
"keys": []jwkset.JWKMarshal{jwk.Marshal()},
6767
})
6868
return

internal/server/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ func UnmarshalYAMLAuthServiceConfig(ctx context.Context, name string, r map[stri
254254
if !ok {
255255
return nil, fmt.Errorf("missing 'type' field or it is not a string")
256256
}
257-
257+
258258
dec, err := util.NewStrictDecoder(r)
259259
if err != nil {
260260
return nil, fmt.Errorf("error creating decoder: %s", err)

0 commit comments

Comments
 (0)