From f16a143125255378acd9516f56371fcc7bae95f4 Mon Sep 17 00:00:00 2001 From: Jan Bader Date: Sat, 21 Nov 2020 22:11:57 +0100 Subject: [PATCH] Do not export delete-methods --- main.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main.go b/main.go index 008f10d..ea99592 100644 --- a/main.go +++ b/main.go @@ -23,7 +23,7 @@ var moveToFolder = flag.String("move-files", "", "Move files to instead o var force = flag.Bool("force", false, "Actually delete files. Without this options, the files to be deleted are only printed") var verbose = flag.Bool("verbose", false, "Output additional information") -func Delete(path string) { +func delete(path string) { if !*force { return } @@ -33,10 +33,10 @@ func Delete(path string) { return } - MoveButDontOvewrite(path, *moveToFolder) + moveButDontOvewrite(path, *moveToFolder) } -func MoveButDontOvewrite(path string, targetPath string) { +func moveButDontOvewrite(path string, targetPath string) { num := 0 filename := filepath.Base(path) @@ -98,7 +98,7 @@ func main() { if strings.HasPrefix(filepath.Clean(file), deleteIn) { fmt.Println("Would delete ", file) if *force { - Delete(file) + delete(file) } } } @@ -138,7 +138,7 @@ func main() { } if *force { - Delete(file) + delete(file) } }