unnecessary use of fmt.Sprint (S1039) (#10049)

This commit is contained in:
guangwu 2023-06-12 02:49:54 +08:00 committed by GitHub
parent 114ae77fb7
commit 7043f6ae29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 58 additions and 62 deletions

View file

@ -160,7 +160,7 @@ func (f *Framework) AfterEach() {
return
}
cmd := fmt.Sprintf("cat /etc/nginx/nginx.conf")
cmd := "cat /etc/nginx/nginx.conf"
o, err := f.ExecCommand(f.pod, cmd)
if err != nil {
Logf("Unexpected error obtaining nginx.conf file: %v", err)
@ -277,7 +277,7 @@ func (f *Framework) matchNginxConditions(name string, matcher func(cfg string) b
return func() (bool, error) {
var cmd string
if name == "" {
cmd = fmt.Sprintf("cat /etc/nginx/nginx.conf")
cmd = "cat /etc/nginx/nginx.conf"
} else {
cmd = fmt.Sprintf("cat /etc/nginx/nginx.conf | awk '/## start server %v/,/## end server %v/'", name, name)
}