diff --git a/app/commands.go b/app/commands.go index 732ad766..49d58033 100644 --- a/app/commands.go +++ b/app/commands.go @@ -104,7 +104,7 @@ func newOldCommand(flags *flags, ui cui.UI) *command { } defer func() { - if err == nil { + if err != nil { ui.Warn("evans: deprecated usage, please use sub-commands. see `evans -h` for more details.") } }() diff --git a/repl/completer.go b/repl/completer.go index 9a541091..8a453d9b 100644 --- a/repl/completer.go +++ b/repl/completer.go @@ -1,7 +1,6 @@ package repl import ( - "fmt" "regexp" "strings" @@ -144,7 +143,7 @@ func newCompleter(cmds map[string]commander) *completer { for _, svc := range svcs { rpcs, err := usecase.ListRPCs(svc) if err != nil { - panic(fmt.Sprintf("ListRPCs must not return an error, but got '%s'", err)) + return nil } for _, rpc := range rpcs { if _, found := encountered[rpc.RequestType.Name]; !found {