diff --git a/main.go b/main.go index 056ad19..e9b14e6 100644 --- a/main.go +++ b/main.go @@ -108,11 +108,19 @@ type HelloCmd struct { } func (*HelloCmd) Run(args []string) (string, error) { - for _, result := range args { + /*for _, result := range args { if result == "help" { return "help of hello", nil } + }*/ + + if len(args) != 0 && args[0] == "help" { + fmt.Println("Inside 1") + return "help of hello", nil + } else if len(args) != 0 && args[0] != "help" { + return "unkown command", nil } + return "Hi, My name is Skynet 1.0. \n How can I help you ? ", nil }