Explorar o código

fix: product config cmd tool product argument matching

luzhenqian %!s(int64=4) %!d(string=hai) anos
pai
achega
f14f6af68d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      tools/pdcfg/product.go

+ 1 - 1
tools/pdcfg/product.go

@@ -82,7 +82,7 @@ func DoProductCommand(args []string) error {
 		return errors.New("command arguments not enough!")
 	}
 
-	op := strings.Replace(args[0], "\n", "", -1)
+	op := strings.TrimSpace(args[0])
 
 	switch op {
 	case "add":