feat: return uint8 also

This commit is contained in:
Calin Martinconi 2024-07-30 22:53:22 +03:00 committed by Márk Sági-Kazár
parent a81d7c13bb
commit 42ae6b5215
1 changed files with 7 additions and 0 deletions

View File

@ -816,6 +816,13 @@ func (v *Viper) GetInt64(key string) int64 {
return cast.ToInt64(v.Get(key))
}
// GetUint8 returns the value associated with the key as an unsigned integer.
func GetUint8(key string) uint8 { return v.GetUint8(key) }
func (v *Viper) GetUint8(key string) uint8 {
return cast.ToUint8(v.Get(key))
}
// GetUint returns the value associated with the key as an unsigned integer.
func GetUint(key string) uint { return v.GetUint(key) }