Skip to content

Commit 8b5b821

Browse files
testwillfntlnz
authored andcommitted
chore: unnecessary use of fmt.Sprintf
Signed-off-by: guoguangwu <[email protected]>
1 parent 4da82e6 commit 8b5b821

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/cmd/get.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ var (
3939
%[1]s trace get --all-namespaces`
4040

4141
argumentsErr = fmt.Sprintf("at most one argument for %s command", getCommand)
42-
missingTargetErr = fmt.Sprintf("specify either a TRACE_ID or a namespace or all namespaces")
42+
missingTargetErr = "specify either a TRACE_ID or a namespace or all namespaces"
4343
)
4444

4545
// GetOptions ...

pkg/tracejob/selected_target.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func ResolveTraceJobTarget(clientset kubernetes.Interface, resource, container,
117117
labels := node.GetLabels()
118118
val, ok := labels["kubernetes.io/hostname"]
119119
if !ok {
120-
return nil, errors.NewErrorInvalid(fmt.Sprintf("label kubernetes.io/hostname not found in node"))
120+
return nil, errors.NewErrorInvalid("label kubernetes.io/hostname not found in node")
121121
}
122122
target.Node = val
123123

0 commit comments

Comments
 (0)