Skip to content

Commit

Permalink
Merge pull request #1342 from testwill/fmt
Browse files Browse the repository at this point in the history
chore: unnecessary use of fmt.Sprintf
  • Loading branch information
denis256 committed Sep 19, 2023
2 parents af9ab8c + 96109ad commit f99fb38
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion modules/dns-helper/errors.go
Expand Up @@ -6,7 +6,7 @@ import "fmt"
type NoResolversError struct{}

func (err NoResolversError) Error() string {
return fmt.Sprintf("No resolvers set for DNSLookupE call")
return "No resolvers set for DNSLookupE call"
}

// QueryTypeError is an error that occurs if the DNS query type is not supported
Expand Down
2 changes: 1 addition & 1 deletion modules/docker/inspect_test.go
Expand Up @@ -63,7 +63,7 @@ func TestInspectWithRandomExposedPort(t *testing.T) {
var unexpectedPort uint16 = 1234
options := &RunOptions{
Detach: true,
OtherOptions: []string{fmt.Sprintf("-P")},
OtherOptions: []string{"-P"},
}

id := RunAndGetID(t, dockerInspectTestImage, options)
Expand Down
4 changes: 2 additions & 2 deletions modules/shell/command_test.go
Expand Up @@ -121,13 +121,13 @@ func TestRunCommandWithHugeLineOutput(t *testing.T) {
t.Parallel()

// generate a ~100KB line
bashCode := fmt.Sprintf(`
bashCode := `
for i in {0..35000}
do
echo -n foo
done
echo
`)
`

cmd := Command{
Command: "bash",
Expand Down

0 comments on commit f99fb38

Please sign in to comment.