From 04e287ee17e2808c2fd010cc30e921958d40c935 Mon Sep 17 00:00:00 2001 From: Neur0toxine Date: Sun, 9 Jun 2019 12:58:37 +0300 Subject: [PATCH] Added clean goal --- Makefile | 6 +++++- src/config.go | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index eb27e08..f0b554d 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,11 @@ BIN=$(PROJECT_DIR)/bin/bash_im_bot build: fmt deps @echo "- Building" @cd $(SRC) && $(GO) build -o $(BIN) - @echo Built "$(BIN)" + @echo - Built "$(BIN)" + +clean: + @echo Cleaning... + @rm -rf $(dir ${BIN}) run: @$(BIN) diff --git a/src/config.go b/src/config.go index c2823e6..9ae1f0e 100644 --- a/src/config.go +++ b/src/config.go @@ -46,11 +46,11 @@ func LoadConfig() (BotConfig, error) { dir, err := filepath.Abs(filepath.Dir(os.Args[0])) if err != nil { - log.Fatal(err) + log.Print(err) } if err := godotenv.Load(filepath.Join(filepath.Dir(dir), ".env")); err != nil { - return cfg, err + log.Print(err) } }