//GetAsInt Function will return the value as int for the specified key. If no value is present for the corresponding key
//then the default value is returned.In case the value is present and it is not a int an error is thrown.
GetAsInt Function will return the value as int for the specified key. If no value is present for the corresponding key
then the default value is returned.In case the value is present and it is not a int an error is thrown.
// GetAsInt Function will return the value as int for the specified key . If no value is present for the corresponding key // then the default value is returned . In case the value is present and it is not a int an error is thrown .
func (p *Properties) GetAsInt(k string, defaultVal int) (int, error) {
	p.RLock()
	defer p.RUnlock()
	if value, ok := p.resolvedProps[k]; ok {
		return strconv.Atoi(value)
	}
	return defaultVal, nil
}
func ( p * Properties ) GetAsInt ( k string , defaultVal int ) ( int , error ) { p . RLock ( ) defer p . RUnlock ( ) if value , ok := p . resolvedProps [ k ] ; ok { return strconv . Atoi ( value ) } return defaultVal , nil }
GetAsInt Function will return the value as int for the specified key.
GetAsInt Function will return the value as int for the specified key .