From 35c72daff416f75de62c85bd00ad578629643fb1 Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Thu, 1 Sep 2022 09:25:59 -0500 Subject: [PATCH] Trim spaces --- lib/common.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/common.go b/lib/common.go index 5ec3b95..b6b82ae 100644 --- a/lib/common.go +++ b/lib/common.go @@ -51,6 +51,9 @@ func BuildURI(rawuri, rawpath string) string { } 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 { return false }