|
|
@ -30,12 +30,12 @@ type mapBasedProperties struct {
|
|
|
|
lock sync.RWMutex
|
|
|
|
lock sync.RWMutex
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Loads the properties into a properties configuration instance. May return the
|
|
|
|
// Loads the properties into a properties configuration instance.
|
|
|
|
// configuration itself along with an error that indicates if there was a problem loading the configuration.
|
|
|
|
// Returns an error that indicates if there was a problem loading the configuration.
|
|
|
|
func LoadProperties(filename string) (Properties, error) {
|
|
|
|
func LoadProperties(filename string) (Properties, error) {
|
|
|
|
lines, err := iox.ReadTextLines(filename, iox.WithoutBlank(), iox.OmitWithPrefix("#"))
|
|
|
|
lines, err := iox.ReadTextLines(filename, iox.WithoutBlank(), iox.OmitWithPrefix("#"))
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return nil, nil
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
raw := make(map[string]string)
|
|
|
|
raw := make(map[string]string)
|
|
|
|