mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
12dc475dd6
fmt.Sprintf is slow and is not needed here, string concatenation would be sufficient. It is also redundant to convert []byte from string and back, since `bytes` package now provides the same functions as `strings`. Use Fields() instead of TrimSpace() and Split(), mainly for readability (note Fields() is somewhat slower than Split() but here it doesn't matter much). Use Join() to prepend the plus signs. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>