diff options
| author | Jeff Carr <[email protected]> | 2024-01-18 00:57:43 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-18 00:57:43 -0600 |
| commit | ff3a51f3544a255b2b2bcd489e7ef71a12e7196a (patch) | |
| tree | 16a0b17d227c71dcb6f96f2ed226a6cbcb712710 /unix.go | |
| parent | 47a665be8bf2724730698fb6775b2f8d904f8629 (diff) | |
gofmt autofix pathsv0.12.9
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'unix.go')
| -rw-r--r-- | unix.go | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -1,14 +1,14 @@ // This is a simple example package repostatus -import ( +import ( + "errors" "os" "os/exec" "os/user" - "strings" - "regexp" - "errors" "path/filepath" + "regexp" + "strings" "go.wit.com/log" ) @@ -54,8 +54,8 @@ func listFiles(directory string) []string { dirname := file.Name() newdir, _ := os.ReadDir(directory + "/" + dirname) for _, file := range newdir { - if ! file.IsDir() { - files = append(files, dirname + "/" + file.Name()) + if !file.IsDir() { + files = append(files, dirname+"/"+file.Name()) } } } else { @@ -91,7 +91,9 @@ func alphaOnly(s string) bool { func normalizeVersion(s string) string { // reg, err := regexp.Compile("[^a-zA-Z0-9]+") parts := strings.Split(s, "-") - if len(parts) == 0 { return "" } + if len(parts) == 0 { + return "" + } reg, err := regexp.Compile("[^0-9.]+") if err != nil { log.Log(WARN, "normalizeVersion() regexp.Compile() ERROR =", err) |
