mirror of
https://github.com/clearlinux/docker.git
synced 2026-10-04 07:48:44 +00:00
Replace json.Unmarshal with json.Decoder().Decode()
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
This commit is contained in:
@@ -58,8 +58,7 @@ func FromParam(p string) (Args, error) {
|
||||
if len(p) == 0 {
|
||||
return args, nil
|
||||
}
|
||||
err := json.Unmarshal([]byte(p), &args)
|
||||
if err != nil {
|
||||
if err := json.NewDecoder(strings.NewReader(p)).Decode(&args); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return args, nil
|
||||
|
||||
Reference in New Issue
Block a user