From ca0aacdb6b2849f054fc235585c8a163a9166a50 Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Wed, 26 Mar 2014 15:45:06 -0700 Subject: [PATCH] beam/data: expose EncodeString for convenience access to the underlying netstring primitive Docker-DCO-1.1-Signed-off-by: Solomon Hykes (github: shykes) --- beam/data/data.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/beam/data/data.go b/beam/data/data.go index 15c302e..cf0cb7c 100644 --- a/beam/data/data.go +++ b/beam/data/data.go @@ -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 {