From e54d0da392119e75788f3d5a431b85e931a7e824 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Fri, 4 Sep 2015 16:56:18 -0700 Subject: Adding unit tests for cmd line --- mattermost.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mattermost.go') diff --git a/mattermost.go b/mattermost.go index 54d08c243..950de2827 100644 --- a/mattermost.go +++ b/mattermost.go @@ -257,6 +257,12 @@ func cmdResetPassword() { os.Exit(1) } + if len(flagPassword) < 5 { + fmt.Fprintln(os.Stderr, "flag invalid argument needs to be more than 4 characters: -password") + flag.Usage() + os.Exit(1) + } + c := &api.Context{} c.RequestId = model.NewId() c.IpAddress = "cmd_line" -- cgit v1.2.3-1-g7c22