Skip to content

Commit

Permalink
chore: unnecessary use of fmt.Sprintf
Browse files Browse the repository at this point in the history
Signed-off-by: guoguangwu <guoguangwug@gmail.com>
  • Loading branch information
testwill authored and fntlnz committed Jul 16, 2024
1 parent 4da82e6 commit 8b5b821
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/cmd/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var (
%[1]s trace get --all-namespaces`

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

// GetOptions ...
Expand Down
2 changes: 1 addition & 1 deletion pkg/tracejob/selected_target.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func ResolveTraceJobTarget(clientset kubernetes.Interface, resource, container,
labels := node.GetLabels()
val, ok := labels["kubernetes.io/hostname"]
if !ok {
return nil, errors.NewErrorInvalid(fmt.Sprintf("label kubernetes.io/hostname not found in node"))
return nil, errors.NewErrorInvalid("label kubernetes.io/hostname not found in node")
}
target.Node = val

Expand Down

0 comments on commit 8b5b821

Please sign in to comment.