Merge pull request #6489 from vieux/fix_mflags_panic

prevent panic when empty flag
This commit is contained in:
Victor Vieux 2014-06-17 14:04:20 -07:00
commit 3336bdf5b5
1 changed files with 3 additions and 0 deletions

View File

@ -778,6 +778,9 @@ func (f *FlagSet) usage() {
}
func trimQuotes(str string) string {
if len(str) == 0 {
return str
}
type quote struct {
start, end byte
}