Trim spaces

This commit is contained in:
Ryan Cavicchioni 2022-09-01 09:25:59 -05:00
parent fa6f06f639
commit 35c72daff4
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D

View File

@ -51,6 +51,9 @@ func BuildURI(rawuri, rawpath string) string {
} }
func HasCommand(s, prefix, cmd string) bool { func HasCommand(s, prefix, cmd string) bool {
s = strings.TrimSpace(s)
// a command cannot be less than two characters e.g. !x
if len(s) < 2 { if len(s) < 2 {
return false return false
} }