mirror of https://github.com/docker/docs.git
data: expose EncodeList and DecodeList
Signed-off-by: Solomon Hykes <solomon@docker.com>
This commit is contained in:
parent
0feebd2320
commit
3d03104af4
|
@ -26,6 +26,8 @@ func encodeString(s string) string {
|
|||
var EncodeString = encodeString
|
||||
var DecodeString = decodeString
|
||||
|
||||
var EncodeList = encodeList
|
||||
|
||||
func encodeList(l []string) string {
|
||||
values := make([]string, 0, len(l))
|
||||
for _, s := range l {
|
||||
|
@ -65,6 +67,8 @@ func Decode(msg string) (map[string][]string, error) {
|
|||
return obj, nil
|
||||
}
|
||||
|
||||
var DecodeList = decodeList
|
||||
|
||||
func decodeList(msg string) ([]string, int, error) {
|
||||
blob, skip, err := decodeString(msg)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue