Skip to content

Commit

Permalink
Merge pull request Jeffail#8 from dsapala/master
Browse files Browse the repository at this point in the history
fixing ParseJSONFile function
  • Loading branch information
Jeffail committed Oct 14, 2015
2 parents feb7ecb + 64639af commit 95f0b32
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions gabs.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,13 +494,15 @@ func ParseJSONFile(path string) (*Container, error) {
if len(path) > 0 {
cBytes, err := ioutil.ReadFile(path)
if err != nil {
container, err := ParseJSON(cBytes)
if err != nil {
return container, nil
}
return nil, err
}
return nil, err

container, err := ParseJSON(cBytes)
if err != nil {
return nil, err
}

return container, nil
}
return nil, ErrInvalidPath
}
Expand Down

0 comments on commit 95f0b32

Please sign in to comment.