1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

beam/data: expose EncodeString for convenience access to the underlying netstring primitive

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
This commit is contained in:
Solomon Hykes 2014-03-26 15:45:06 -07:00
parent fb1af1f0bc
commit a5bc75d406

View file

@ -23,6 +23,8 @@ func encodeString(s string) string {
return fmt.Sprintf("%d:%s,", len(s), s)
}
var EncodeString = encodeString
func encodeList(l []string) string {
values := make([]string, 0, len(l))
for _, s := range l {