Merge pull request #18220 from mqliang/temvarible
remove unnecessary temporary variable
This commit is contained in:
commit
bb11900393
|
|
@ -2,7 +2,6 @@ package builder
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
@ -32,15 +31,13 @@ func TestSelectAcceptableMIME(t *testing.T) {
|
||||||
|
|
||||||
for _, m := range invalidMimeStrings {
|
for _, m := range invalidMimeStrings {
|
||||||
if len(selectAcceptableMIME(m)) > 0 {
|
if len(selectAcceptableMIME(m)) > 0 {
|
||||||
err := fmt.Errorf("Should not have accepted %q", m)
|
t.Fatalf("Should not have accepted %q", m)
|
||||||
t.Fatal(err)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, m := range validMimeStrings {
|
for _, m := range validMimeStrings {
|
||||||
if str := selectAcceptableMIME(m); str == "" {
|
if str := selectAcceptableMIME(m); str == "" {
|
||||||
err := fmt.Errorf("Should have accepted %q", m)
|
t.Fatalf("Should have accepted %q", m)
|
||||||
t.Fatal(err)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue