Browse code

prevent panic when empty flag

Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)

Victor Vieux authored on 2014/06/18 05:45:57
Showing 1 changed files
... ...
@@ -778,6 +778,9 @@ func (f *FlagSet) usage() {
778 778
 }
779 779
 
780 780
 func trimQuotes(str string) string {
781
+	if len(str) == 0 {
782
+		return str
783
+	}
781 784
 	type quote struct {
782 785
 		start, end byte
783 786
 	}