Skip to content

Commit 2616d09

Browse files
authored
Merge pull request #7 from my10c/master
Added new function IsFound
2 parents 1834968 + 35ec36e commit 2616d09

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

simpleyaml.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ func NewYaml(body []byte) (*Yaml, error) {
4848
return &Yaml{val}, nil
4949
}
5050

51+
// Check if the given branch was found
52+
func (y *Yaml) IsFound() bool {
53+
if y.data == nil {
54+
return false
55+
}
56+
return true
57+
}
58+
5159
// Get returns a pointer to a new `Yaml` object for `key` in its `map` representation
5260
//
5361
// Example:

0 commit comments

Comments
 (0)