mirror of https://github.com/spf13/viper.git
feat: return uint8 also
This commit is contained in:
parent
a81d7c13bb
commit
42ae6b5215
7
viper.go
7
viper.go
|
@ -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) }
|
||||
|
||||
|
|
Loading…
Reference in New Issue