Skip to content

Commit

Permalink
yamlutils: fix go.mod path and handle error
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidGamba committed Jan 24, 2023
1 parent 27fedf7 commit 6553e93
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion yamlutils/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/dgtools/yamlutils
module github.com/DavidGamba/dgtools/yamlutils

go 1.16

Expand Down
4 changes: 4 additions & 0 deletions yamlutils/yamlutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ type YML struct {
func NewFromFile(filename string) ([]*YML, error) {
list := []*YML{}
fh, err := os.Open(filename)
if err != nil {
return nil, err
}

decoder := yaml.NewDecoder(fh)
for {
var tree interface{}
Expand Down

0 comments on commit 6553e93

Please sign in to comment.