From a04b6783703457f89df002c7f3533ca47d38c0c6 Mon Sep 17 00:00:00 2001 From: Di Xu Date: Tue, 7 Feb 2017 22:52:28 +0800 Subject: [PATCH] cache command name --- command.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command.go b/command.go index 3ee1a0a9..c5b10945 100644 --- a/command.go +++ b/command.go @@ -969,7 +969,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.