// all unsigned int64 are also stored int64... unless overflowed... func (this Configuration) Uint64(key string, def ...uint64) (res uint64) { if len(def) > 0 { res = def[0] } if tuint64, err := util.CastUint64(this.Interface(key, def)); err == nil { res = tuint64 } return }
func (this Configuration) Uint64Slice(key string, def ...[]uint64) (res []uint64) { if len(def) > 0 { res = def[0] } if v := this.Slice(key, nil); v != nil { sl := make([]uint64, len(v)) var err error for i, val := range v { if sl[i], err = util.CastUint64(val); err != nil { return } } res = sl } return }
func (this Configuration) Uint32Slice(key string, def ...[]uint32) (res []uint32) { if len(def) > 0 { res = def[0] } if v := this.Slice(key, nil); v != nil { sl := make([]uint32, len(v)) for i, val := range v { if tuint64, err := util.CastUint64(val); err == nil { sl[i] = uint32(tuint64) } else { return } } res = sl } return }