Skip to content

Commit 1abe97e

Browse files
committed
chore: fixing formatting in 'format' functions to avoid: 'non-constant format string in call'
Signed-off-by: MenD32 <[email protected]>
1 parent c9679f6 commit 1abe97e

File tree

2 files changed

+7
-7
lines changed
  • cluster-autoscaler/cloudprovider

2 files changed

+7
-7
lines changed

cluster-autoscaler/cloudprovider/aws/aws-sdk-go/service/dynamodb/dynamodbattribute/converter.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func ConvertToMap(in interface{}) (item map[string]*dynamodb.AttributeValue, err
2525
if e, ok := r.(runtime.Error); ok {
2626
err = e
2727
} else if s, ok := r.(string); ok {
28-
err = fmt.Errorf(s)
28+
err = fmt.Errorf("%s", s)
2929
} else {
3030
err = r.(error)
3131
}
@@ -73,7 +73,7 @@ func ConvertFromMap(item map[string]*dynamodb.AttributeValue, v interface{}) (er
7373
if e, ok := r.(runtime.Error); ok {
7474
err = e
7575
} else if s, ok := r.(string); ok {
76-
err = fmt.Errorf(s)
76+
err = fmt.Errorf("%s", s)
7777
} else {
7878
err = r.(error)
7979
}
@@ -127,7 +127,7 @@ func ConvertToList(in interface{}) (item []*dynamodb.AttributeValue, err error)
127127
if e, ok := r.(runtime.Error); ok {
128128
err = e
129129
} else if s, ok := r.(string); ok {
130-
err = fmt.Errorf(s)
130+
err = fmt.Errorf("%s", s)
131131
} else {
132132
err = r.(error)
133133
}
@@ -176,7 +176,7 @@ func ConvertFromList(item []*dynamodb.AttributeValue, v interface{}) (err error)
176176
if e, ok := r.(runtime.Error); ok {
177177
err = e
178178
} else if s, ok := r.(string); ok {
179-
err = fmt.Errorf(s)
179+
err = fmt.Errorf("%s", s)
180180
} else {
181181
err = r.(error)
182182
}
@@ -224,7 +224,7 @@ func ConvertTo(in interface{}) (item *dynamodb.AttributeValue, err error) {
224224
if e, ok := r.(runtime.Error); ok {
225225
err = e
226226
} else if s, ok := r.(string); ok {
227-
err = fmt.Errorf(s)
227+
err = fmt.Errorf("%s", s)
228228
} else {
229229
err = r.(error)
230230
}
@@ -254,7 +254,7 @@ func ConvertFrom(item *dynamodb.AttributeValue, v interface{}) (err error) {
254254
if e, ok := r.(runtime.Error); ok {
255255
err = e
256256
} else if s, ok := r.(string); ok {
257-
err = fmt.Errorf(s)
257+
err = fmt.Errorf("%s", s)
258258
} else {
259259
err = r.(error)
260260
}

cluster-autoscaler/cloudprovider/volcengine/volcengine-go-sdk/volcengine/credentials/sts_provider.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func (s *StsProvider) Retrieve() (Value, error) {
6262
if _err != nil {
6363
return Value{}, _err
6464
}
65-
return Value{}, fmt.Errorf(string(bb))
65+
return Value{}, fmt.Errorf("%s", string(bb))
6666
}
6767
return Value{}, err
6868
}

0 commit comments

Comments
 (0)