Skip to content

Commit b937fa0

Browse files
committed
Added support for go-path-helper module
1 parent 22ef7d4 commit b937fa0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

properties.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ import (
7474
"runtime"
7575
"sort"
7676
"strings"
77+
78+
"github.com/arduino/go-paths-helper"
7779
)
7880

7981
// Map is a container of properties
@@ -114,6 +116,11 @@ func Load(filepath string) (Map, error) {
114116
return properties, nil
115117
}
116118

119+
// LoadFromPath reads a properties file and makes a Map out of it.
120+
func LoadFromPath(path *paths.Path) (Map, error) {
121+
return Load(path.String())
122+
}
123+
117124
// LoadFromSlice reads a properties file from an array of string
118125
// and makes a Map out of it
119126
func LoadFromSlice(lines []string) (Map, error) {

0 commit comments

Comments
 (0)