Skip to content

Commit 201b6e6

Browse files
committed
chore: linting
1 parent 2cc38ac commit 201b6e6

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

cmd/misspell/main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ func main() {
159159
//
160160
// Stuff to ignore
161161
//
162-
if len(*ignores) > 0 {
162+
if *ignores != "" {
163163
r.RemoveRule(strings.Split(*ignores, ","))
164164
}
165165

@@ -188,7 +188,7 @@ func main() {
188188
defaultWrite = tmpl
189189
defaultRead = tmpl
190190
stdout.Println(sqliteHeader)
191-
case len(*format) > 0:
191+
case *format != "":
192192
t, err := template.New("custom").Parse(*format)
193193
if err != nil {
194194
log.Fatalf("Unable to compile log format: %s", err)

ignore/glob.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func NewBaseGlobMatch(arg string, truth bool) (*GlobMatch, error) {
8989
// Arg true should be set to false if the output is inverted.
9090
func NewPathGlobMatch(arg string, truth bool) (*GlobMatch, error) {
9191
// if starts with "/" then glob only applies to top level
92-
if len(arg) > 0 && arg[0] == '/' {
92+
if arg != "" && arg[0] == '/' {
9393
arg = arg[1:]
9494
}
9595

notwords.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var (
2020
func RemovePath(s string) string {
2121
out := bytes.Buffer{}
2222
var idx int
23-
for len(s) > 0 {
23+
for s != "" {
2424
if idx = strings.IndexByte(s, '/'); idx == -1 {
2525
out.WriteString(s)
2626
break

0 commit comments

Comments
 (0)