summaryrefslogtreecommitdiff
path: root/unix.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-18 00:57:43 -0600
committerJeff Carr <[email protected]>2024-01-18 00:57:43 -0600
commitff3a51f3544a255b2b2bcd489e7ef71a12e7196a (patch)
tree16a0b17d227c71dcb6f96f2ed226a6cbcb712710 /unix.go
parent47a665be8bf2724730698fb6775b2f8d904f8629 (diff)
gofmt autofix pathsv0.12.9
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'unix.go')
-rw-r--r--unix.go16
1 files changed, 9 insertions, 7 deletions
diff --git a/unix.go b/unix.go
index 7ef0fed..716798e 100644
--- a/unix.go
+++ b/unix.go
@@ -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)