From 4ca82fea0073da7c7e3fd978dfe4002c312e0678 Mon Sep 17 00:00:00 2001 From: Johan Vester Date: Wed, 21 Oct 2020 01:22:10 +0200 Subject: [PATCH] Remove safeguards around rename functionality --- cmd/sammy.go | 10 ++++------ sammy.go | 1 - 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/cmd/sammy.go b/cmd/sammy.go index 8108950..a317169 100644 --- a/cmd/sammy.go +++ b/cmd/sammy.go @@ -68,12 +68,10 @@ func main() { os.Exit(0) } - /* - err = sammy.Rename(cs) - if err != nil { - handleError(l, err, debug) - } - */ + err = sammy.Rename(cs) + if err != nil { + handleError(l, err, debug) + } err = printChangeSet(l, dir, cs) if err != nil { diff --git a/sammy.go b/sammy.go index 19fdbf5..40f0e4a 100644 --- a/sammy.go +++ b/sammy.go @@ -68,7 +68,6 @@ func GenerateChangeSet(l *log.Logger, dir string, tfs ...Transformer) (map[strin } func Rename(cs map[string]string) error { - return nil for o, n := range cs { err := os.Rename(o, n) if err != nil {