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 52edbe6a23
commit 661a1e9026
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
}