Skip to content

Commit

Permalink
Cleaned up the code a bit more, based on feedback from go-critic
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasbn committed Feb 13, 2023
1 parent 48778b1 commit f94593e
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,12 @@ func realMain() int {
fmt.Printf("ignorelines: \n%s\n\n", ignoreLines)
}

} else {

if ignoreFile == "" {
ignoreFile = path + "/.dockerignore"
} else if ignoreFile == "" {
ignoreFile = path + "/.dockerignore"

if debug {
fmt.Println("path: ", path)
fmt.Println("ignoreFile: ", ignoreFile)
}
if debug {
fmt.Println("path: ", path)
fmt.Println("ignoreFile: ", ignoreFile)
}
}

Expand Down Expand Up @@ -182,10 +179,8 @@ func realMain() int {
ownIgnoreObject = ignore.CompileIgnoreLines([]string{}...)
}

} else {
if debug {
fmt.Println("No stevedore ignorefile found")
}
} else if debug {
fmt.Println("No stevedore ignorefile found")
}

err = filepath.Walk(path, func(path string, info fs.FileInfo, err error) error {
Expand Down

0 comments on commit f94593e

Please sign in to comment.