diff options
author | =Corey Hulen <corey@hulen.com> | 2015-09-04 16:56:18 -0700 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-09-04 16:56:18 -0700 |
commit | e54d0da392119e75788f3d5a431b85e931a7e824 (patch) | |
tree | d2e3711db047060fb1e5db60dfc658949a697995 /mattermost.go | |
parent | 58d0d9afd286afd715e9f04825e1305045d404e2 (diff) | |
download | chat-e54d0da392119e75788f3d5a431b85e931a7e824.tar.gz chat-e54d0da392119e75788f3d5a431b85e931a7e824.tar.bz2 chat-e54d0da392119e75788f3d5a431b85e931a7e824.zip |
Adding unit tests for cmd line
Diffstat (limited to 'mattermost.go')
-rw-r--r-- | mattermost.go | 6 |
1 files changed, 6 insertions, 0 deletions
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" |