mirror of
https://github.com/TomWright/dasel.git
synced 2022-05-22 02:32:45 +03:00
Simplify NewFromFile
This commit is contained in:
16
node.go
16
node.go
@@ -142,21 +142,7 @@ func NewFromFile(path, parser string) (*Node, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
rootNode := &Node{
|
||||
Previous: nil,
|
||||
Next: nil,
|
||||
NextMultiple: nil,
|
||||
Selector: Selector{
|
||||
Raw: ".",
|
||||
Current: ".",
|
||||
Remaining: "",
|
||||
Type: "ROOT",
|
||||
Property: "",
|
||||
},
|
||||
}
|
||||
|
||||
rootNode.setRealValue(data)
|
||||
return rootNode, nil
|
||||
return New(data), nil
|
||||
}
|
||||
|
||||
func (n *Node) setValue(newValue interface{}) {
|
||||
|
||||
Reference in New Issue
Block a user