From b0c39fe7d746545b6778b6885af0963726f1adf9 Mon Sep 17 00:00:00 2001 From: Oleg Kovalov Date: Tue, 28 Jun 2022 18:55:35 +0200 Subject: [PATCH] Relax command name even more (#30) --- acmd.go | 2 +- acmd_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/acmd.go b/acmd.go index 8ed54a0..ed477d0 100644 --- a/acmd.go +++ b/acmd.go @@ -241,7 +241,7 @@ func isStringValid(s string) bool { } for _, c := range s { if !(('A' <= c && c <= 'Z') || ('a' <= c && c <= 'z') || - ('0' <= c && c <= '9') || c == '-' || c == '_' || c == ':') { + ('0' <= c && c <= '9') || c == '-' || c == '_' || c == ':' || c == '.') { return false } } diff --git a/acmd_test.go b/acmd_test.go index 17d98a9..bd9ce85 100644 --- a/acmd_test.go +++ b/acmd_test.go @@ -205,7 +205,7 @@ func TestRunnerInit(t *testing.T) { wantErrStr string }{ { - cmds: []Command{{Name: "app:create", Do: nopFunc}}, + cmds: []Command{{Name: "app:cre.ate", Do: nopFunc}}, wantErrStr: ``, }, {