fix: do not output empty arguments
Also ensure we use Printf instead of Print...
This commit is contained in:
1 parent
8db3b8e333
commit
3f0126a471
1 file changed
+8
-2
+8
-2
@@ -63,11 +63,17 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for key, value := range limits {
|
for key, value := range limits {
|
||||||
fmt.Print(" --%s=%s ", key, value)
|
if value == "" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
fmt.Printf(" --%s=%s ", key, value)
|
||||||
}
|
}
|
||||||
|
|
||||||
for key, value := range reservations {
|
for key, value := range reservations {
|
||||||
fmt.Print(" --%s-reservation=%s ", key, value)
|
if value == "" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
fmt.Printf(" --%s-reservation=%s ", key, value)
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Print(string(stdin))
|
fmt.Print(string(stdin))
|
||||||
|
|||||||
Reference in new issue
Block a user