From 4584a4e762165394beadd6245558c9522d9c4b63 Mon Sep 17 00:00:00 2001 From: yangshukui Date: Thu, 22 Oct 2015 14:31:15 +0800 Subject: [PATCH] Remove naked return Signed-off-by: yangshukui --- spec.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec.go b/spec.go index 9958f486..7c393682 100644 --- a/spec.go +++ b/spec.go @@ -299,7 +299,7 @@ func loadSpec(cPath, rPath string) (spec *specs.LinuxSpec, rspec *specs.LinuxRun if os.IsNotExist(err) { return nil, nil, fmt.Errorf("JSON specification file at %s not found", cPath) } - return + return spec, rspec, err } defer cf.Close() @@ -308,15 +308,15 @@ func loadSpec(cPath, rPath string) (spec *specs.LinuxSpec, rspec *specs.LinuxRun if os.IsNotExist(err) { return nil, nil, fmt.Errorf("JSON runtime config file at %s not found", rPath) } - return + return spec, rspec, err } defer rf.Close() if err = json.NewDecoder(cf).Decode(&spec); err != nil { - return + return spec, rspec, err } if err = json.NewDecoder(rf).Decode(&rspec); err != nil { - return + return spec, rspec, err } return spec, rspec, checkSpecVersion(spec) }