From 28661ccc920c8fa74ff28d52e9883cc501546f62 Mon Sep 17 00:00:00 2001 From: Ivan Vlasic Date: Tue, 11 Jan 2022 10:26:01 +0100 Subject: [PATCH] delete images dir on new --- cli/controller/new.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cli/controller/new.go b/cli/controller/new.go index 434f07b..f63c9a7 100644 --- a/cli/controller/new.go +++ b/cli/controller/new.go @@ -33,6 +33,7 @@ const ( DefaultTemplate = PingTemplate LicenseFile = "LICENSE" ReadmeFile = "README.md" + ImagesDir = "images" ) type NewArgs struct { @@ -75,9 +76,7 @@ func createProject(name, from, moduleName string) error { if !isExternalRepo(from) { os.Remove(filepath.Join(projectPath, LicenseFile)) os.Remove(filepath.Join(projectPath, ReadmeFile)) - if from == ExcusesTemplate { - os.Remove(filepath.Join(projectPath, "excuses.png")) - } + os.RemoveAll(filepath.Join(projectPath, ImagesDir)) } fs, err := newStore()