From b5d8e8f46a2f829f755b6e33b454e25c61c935e1 Mon Sep 17 00:00:00 2001 From: Di Xu Date: Fri, 10 Feb 2017 00:54:17 +0800 Subject: [PATCH] cache command name (#390) --- command.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command.go b/command.go index 57c5fcd..5c1c3a0 100644 --- a/command.go +++ b/command.go @@ -972,7 +972,8 @@ func (c *Command) Name() string { if i >= 0 { name = name[:i] } - return name + c.name = name + return c.name } // HasAlias determines if a given string is an alias of the command.