In GetInt function should return default value instead of panic
// GetInt parses the expanded value as an int if the key exists.
// If key does not exist or the value cannot be parsed the default
// value is returned. If the value does not fit into an int the
// function panics with an out of range error.
func (p *Properties) GetInt(key string, def int) int {
v, err := p.getInt64(key)
if err != nil {
return def
}
return intRangeCheck(key, v)
}
In
GetInt
function should return default value instead of panicmore: https://github.com/magiconair/properties/blob/c9a06e8f8f0164e4e16c0d5c4793cbed4ac90264/rangecheck.go#L19