From f04bf8e54597d39061a6abe668ad4939a386f4db Mon Sep 17 00:00:00 2001 From: Gregory Rudolph Date: Wed, 23 Oct 2019 10:11:15 -0400 Subject: [PATCH] Bugfix: Load displayed an error because of missing return statement --- cmdSet.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmdSet.go b/cmdSet.go index 68a2d39..83e225c 100644 --- a/cmdSet.go +++ b/cmdSet.go @@ -23,7 +23,6 @@ func printSetting(cmd []string) { switch cmd[1] { case "load": loadFromToml() - printToView("Feed", fmt.Sprintf("Loading config from toml")) case "downloadPath": printToView("Feed", fmt.Sprintf("Setting for %s -> %s", cmd[1], downloadPath)) case "outputFormat": @@ -47,6 +46,7 @@ func cmdSet(cmd []string) { } if len(cmd) < 3 { printSetting(cmd) + return } switch cmd[1] { case "downloadPath": @@ -68,6 +68,7 @@ func cmdSet(cmd []string) { } func loadFromToml() { + printToView("Feed", fmt.Sprintf("Loading config from toml")) config, err := toml.LoadFile("kbtui.tml") if err != nil { printToView("Feed", fmt.Sprintf("Could not read config file: %+v", err))