Remove unnecessary json.Unmarshal wrapper.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: fb42e8477208badf0714a9d8ae20946a9b531dba
Component: engine
This commit is contained in:
Daniel Nephin
2016-08-04 12:17:37 -04:00
parent 1c5ac9c7e1
commit 2b0a71c4f1
8 changed files with 16 additions and 43 deletions

View File

@ -1,6 +1,7 @@
package main
import (
"encoding/json"
"fmt"
"regexp"
"strings"
@ -97,7 +98,7 @@ func (s *DockerSuite) TestLinksInspectLinksStarted(c *check.C) {
dockerCmd(c, "run", "-d", "--name", "testinspectlink", "--link", "container1:alias1", "--link", "container2:alias2", "busybox", "top")
links := inspectFieldJSON(c, "testinspectlink", "HostConfig.Links")
err := unmarshalJSON([]byte(links), &result)
err := json.Unmarshal([]byte(links), &result)
c.Assert(err, checker.IsNil)
output := convertSliceOfStringsToMap(result)
@ -116,7 +117,7 @@ func (s *DockerSuite) TestLinksInspectLinksStopped(c *check.C) {
dockerCmd(c, "run", "-d", "--name", "testinspectlink", "--link", "container1:alias1", "--link", "container2:alias2", "busybox", "true")
links := inspectFieldJSON(c, "testinspectlink", "HostConfig.Links")
err := unmarshalJSON([]byte(links), &result)
err := json.Unmarshal([]byte(links), &result)
c.Assert(err, checker.IsNil)
output := convertSliceOfStringsToMap(result)