mirror of
https://github.com/spf13/viper
synced 2024-11-13 00:27:02 +00:00
feat: return uint8 also
This commit is contained in:
parent
a81d7c13bb
commit
42ae6b5215
1 changed files with 7 additions and 0 deletions
7
viper.go
7
viper.go
|
@ -816,6 +816,13 @@ func (v *Viper) GetInt64(key string) int64 {
|
||||||
return cast.ToInt64(v.Get(key))
|
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.
|
// GetUint returns the value associated with the key as an unsigned integer.
|
||||||
func GetUint(key string) uint { return v.GetUint(key) }
|
func GetUint(key string) uint { return v.GetUint(key) }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue