fix S1039 unnecessary use of fmt.Sprintf

Signed-off-by: Ken Sipe <kensipe@gmail.com>
This commit is contained in:
Ken Sipe 2020-06-25 17:04:41 -05:00
parent e3de62298a
commit 168677400c
No known key found for this signature in database
GPG Key ID: 564882A82432498D
2 changed files with 2 additions and 2 deletions

View File

@ -116,7 +116,7 @@ func (f *structuredMergeManager) Apply(liveObj, patchObj runtime.Object, managed
return nil, nil, fmt.Errorf("couldn't get accessor: %v", err)
}
if patchObjMeta.GetManagedFields() != nil {
return nil, nil, errors.NewBadRequest(fmt.Sprintf("metadata.managedFields must be nil"))
return nil, nil, errors.NewBadRequest("metadata.managedFields must be nil")
}
liveObjVersioned, err := f.toVersioned(liveObj)

View File

@ -877,7 +877,7 @@ func TestDispatchingBookmarkEventsWithConcurrentStop(t *testing.T) {
resourceVersion := uint64(1000)
err = cacher.watchCache.Add(&examplev1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: fmt.Sprintf("pod-0"),
Name: "pod-0",
Namespace: "ns",
ResourceVersion: fmt.Sprintf("%v", resourceVersion),
}})