Browse Source

Bugfix: Load displayed an error because of missing return statement

pull/28/head
Gregory Rudolph 5 years ago
parent
commit
f04bf8e545
Signed by: rudi
GPG Key ID: EF64F3CBD1A1EBDD
  1. 3
      cmdSet.go

3
cmdSet.go

@ -23,7 +23,6 @@ func printSetting(cmd []string) { @@ -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) { @@ -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) { @@ -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))

Loading…
Cancel
Save