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

Remove unnecessary json.Unmarshal wrapper.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin 2016-08-04 12:17:37 -04:00
parent 0b2ff0ccde
commit fb42e84772
8 changed files with 16 additions and 43 deletions

View file

@ -3,7 +3,6 @@ package integration
import (
"archive/tar"
"bytes"
"encoding/json"
"errors"
"fmt"
"io"
@ -209,15 +208,6 @@ func RunCommandPipelineWithOutput(cmds ...*exec.Cmd) (output string, exitCode in
return RunCommandWithOutput(cmds[len(cmds)-1])
}
// UnmarshalJSON deserialize a JSON in the given interface.
func UnmarshalJSON(data []byte, result interface{}) error {
if err := json.Unmarshal(data, result); err != nil {
return err
}
return nil
}
// ConvertSliceOfStringsToMap converts a slices of string in a map
// with the strings as key and an empty string as values.
func ConvertSliceOfStringsToMap(input []string) map[string]struct{} {