Skip to content

Commit d6569d3

Browse files
authored
Merge pull request #1518 from saschagrunert/emptyStringTest
Fix `emptyStringTest` linter
2 parents d13cbf0 + 363801a commit d6569d3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.golangci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ linters-settings:
139139
- dynamicFmtString
140140
- emptyDecl
141141
- emptyFallthrough
142+
- emptyStringTest
142143
- equalFold
143144
- evalOrder
144145
- exposedSyncMutex
@@ -186,7 +187,6 @@ linters-settings:
186187
- unnecessaryDefer
187188
- weakCond
188189
- yodaStyleExpr
189-
# - emptyStringTest
190190
# - hugeParam
191191
# - importShadow
192192
# - octalLiteral

cmd/crictl/events.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ var eventsCommand = &cli.Command{
5151

5252
switch format := c.String("output"); format {
5353
case "json", "yaml":
54-
if len(c.String("template")) > 0 {
54+
if c.String("template") != "" {
5555
return fmt.Errorf("template can't be used with %q format", format)
5656
}
5757
case "go-template":

0 commit comments

Comments
 (0)