prevent panic when empty flag

Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
This commit is contained in:
Victor Vieux 2014-06-17 20:45:57 +00:00
parent 40f159f045
commit d18d9ffeaa

View file

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