diff options
author | Nick White <git@njw.name> | 2020-02-20 10:27:21 +0000 |
---|---|---|
committer | Nick White <git@njw.name> | 2020-02-20 10:27:21 +0000 |
commit | 8c8590498bbc826599a13f3329d45d2bf968214c (patch) | |
tree | 6086fb5086d3eee17999eaa4420ebea942011da9 /pare-gt/main.go | |
parent | 676b96f0f6c72a3b84de11521f82a337e59c829e (diff) |
[pare-gt] gofmt
Diffstat (limited to 'pare-gt/main.go')
-rw-r--r-- | pare-gt/main.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pare-gt/main.go b/pare-gt/main.go index 1f397f8..c645480 100644 --- a/pare-gt/main.go +++ b/pare-gt/main.go @@ -25,7 +25,7 @@ type Prefixes = map[string][]string // walker adds any .txt path to prefixes map, under the appropriate // prefix (blank if no '-' separator was found) -func walker(prefixes *Prefixes) filepath.WalkFunc{ +func walker(prefixes *Prefixes) filepath.WalkFunc { return func(fpath string, info os.FileInfo, err error) error { if err != nil { return err @@ -80,7 +80,7 @@ func samplePrefixes(perctosample int, prefixes Prefixes) (filestomove []string) if numtoget < 1 { numtoget = 1 } - for i:=0; i<numtoget; i++ { + for i := 0; i < numtoget; i++ { var selected string selected = prefix[rand.Int()%len] // pick a different random selection if the first one is @@ -127,9 +127,9 @@ func main() { fmt.Println("Moving ground truth", f) b := path.Base(f) for _, ext := range []string{".txt", ".png"} { - err = os.Rename(f + ext, path.Join(flag.Arg(1), b + ext)) + err = os.Rename(f+ext, path.Join(flag.Arg(1), b+ext)) if err != nil { - log.Fatalln("Error moving file", f + ext, err) + log.Fatalln("Error moving file", f+ext, err) } } } |