d4213c2358
This mirrors the --preserve-fds option of Podman. Converting an unsigned 'uint', which is what Podman uses for its --preserve-fds option, to a string is surprisingly annoying. strconv.Itoa [1] takes a signed 'int', which would require a cast, and there's no unsigned counterpart. There's strconv.FormatUint [2] which takes an unsigned 'uint64', which is better, but would still require a cast. So, fmt.Sprint [3] it is, if the cast is to be avoided. It's more expensive than the other two functions, but there's no need to worry unless it's proven to be a performance bottle neck. Some changes by Debarshi Ray. [1] https://pkg.go.dev/strconv#Itoa [2] https://pkg.go.dev/strconv#FormatUint [3] https://pkg.go.dev/fmt#Sprint https://github.com/containers/toolbox/issues/1066 Signed-off-by: Allison Karlitskaya <allison.karlitskaya@redhat.com> |
||
---|---|---|
.. | ||
meson.build | ||
toolbox-create.1.md | ||
toolbox-enter.1.md | ||
toolbox-help.1.md | ||
toolbox-init-container.1.md | ||
toolbox-list.1.md | ||
toolbox-rm.1.md | ||
toolbox-rmi.1.md | ||
toolbox-run.1.md | ||
toolbox.1.md | ||
toolbox.conf.5.md |