mirror of
https://gitee.com/johng/gf
synced 2026-06-07 02:12:11 +08:00
修正gmap部分类型全局替换造成的错误
This commit is contained in:
@ -59,27 +59,27 @@ func (this *IntInterfaceMap) Get(key int) (interface{}) {
|
||||
}
|
||||
|
||||
func (this *IntInterfaceMap) GetBool(key int) bool {
|
||||
return gconv.Bool(this.mu.Get(key))
|
||||
return gconv.Bool(this.Get(key))
|
||||
}
|
||||
|
||||
func (this *IntInterfaceMap) GetInt(key int) int {
|
||||
return gconv.Int(this.mu.Get(key))
|
||||
return gconv.Int(this.Get(key))
|
||||
}
|
||||
|
||||
func (this *IntInterfaceMap) GetUint (key int) uint {
|
||||
return gconv.Uint(this.mu.Get(key))
|
||||
return gconv.Uint(this.Get(key))
|
||||
}
|
||||
|
||||
func (this *IntInterfaceMap) GetFloat32 (key int) float32 {
|
||||
return gconv.Float32(this.mu.Get(key))
|
||||
return gconv.Float32(this.Get(key))
|
||||
}
|
||||
|
||||
func (this *IntInterfaceMap) GetFloat64 (key int) float64 {
|
||||
return gconv.Float64(this.mu.Get(key))
|
||||
return gconv.Float64(this.Get(key))
|
||||
}
|
||||
|
||||
func (this *IntInterfaceMap) GetString (key int) string {
|
||||
return gconv.String(this.mu.Get(key))
|
||||
return gconv.String(this.Get(key))
|
||||
}
|
||||
|
||||
// 删除键值对
|
||||
|
||||
@ -59,27 +59,27 @@ func (this *InterfaceInterfaceMap) Get(key interface{}) (interface{}) {
|
||||
}
|
||||
|
||||
func (this *InterfaceInterfaceMap) GetBool(key interface{}) bool {
|
||||
return gconv.Bool(this.mu.Get(key))
|
||||
return gconv.Bool(this.Get(key))
|
||||
}
|
||||
|
||||
func (this *InterfaceInterfaceMap) GetInt(key interface{}) int {
|
||||
return gconv.Int(this.mu.Get(key))
|
||||
return gconv.Int(this.Get(key))
|
||||
}
|
||||
|
||||
func (this *InterfaceInterfaceMap) GetUint (key interface{}) uint {
|
||||
return gconv.Uint(this.mu.Get(key))
|
||||
return gconv.Uint(this.Get(key))
|
||||
}
|
||||
|
||||
func (this *InterfaceInterfaceMap) GetFloat32 (key interface{}) float32 {
|
||||
return gconv.Float32(this.mu.Get(key))
|
||||
return gconv.Float32(this.Get(key))
|
||||
}
|
||||
|
||||
func (this *InterfaceInterfaceMap) GetFloat64 (key interface{}) float64 {
|
||||
return gconv.Float64(this.mu.Get(key))
|
||||
return gconv.Float64(this.Get(key))
|
||||
}
|
||||
|
||||
func (this *InterfaceInterfaceMap) GetString (key interface{}) string {
|
||||
return gconv.String(this.mu.Get(key))
|
||||
return gconv.String(this.Get(key))
|
||||
}
|
||||
|
||||
// 删除键值对
|
||||
|
||||
@ -59,27 +59,27 @@ func (this *StringInterfaceMap) Get(key string) interface{} {
|
||||
}
|
||||
|
||||
func (this *StringInterfaceMap) GetBool(key string) bool {
|
||||
return gconv.Bool(this.mu.Get(key))
|
||||
return gconv.Bool(this.Get(key))
|
||||
}
|
||||
|
||||
func (this *StringInterfaceMap) GetInt(key string) int {
|
||||
return gconv.Int(this.mu.Get(key))
|
||||
return gconv.Int(this.Get(key))
|
||||
}
|
||||
|
||||
func (this *StringInterfaceMap) GetUint (key string) uint {
|
||||
return gconv.Uint(this.mu.Get(key))
|
||||
return gconv.Uint(this.Get(key))
|
||||
}
|
||||
|
||||
func (this *StringInterfaceMap) GetFloat32 (key string) float32 {
|
||||
return gconv.Float32(this.mu.Get(key))
|
||||
return gconv.Float32(this.Get(key))
|
||||
}
|
||||
|
||||
func (this *StringInterfaceMap) GetFloat64 (key string) float64 {
|
||||
return gconv.Float64(this.mu.Get(key))
|
||||
return gconv.Float64(this.Get(key))
|
||||
}
|
||||
|
||||
func (this *StringInterfaceMap) GetString (key string) string {
|
||||
return gconv.String(this.mu.Get(key))
|
||||
return gconv.String(this.Get(key))
|
||||
}
|
||||
|
||||
// 删除键值对
|
||||
|
||||
@ -59,27 +59,27 @@ func (this *UintInterfaceMap) Get(key uint) (interface{}) {
|
||||
}
|
||||
|
||||
func (this *UintInterfaceMap) GetBool(key uint) bool {
|
||||
return gconv.Bool(this.mu.Get(key))
|
||||
return gconv.Bool(this.Get(key))
|
||||
}
|
||||
|
||||
func (this *UintInterfaceMap) GetInt(key uint) int {
|
||||
return gconv.Int(this.mu.Get(key))
|
||||
return gconv.Int(this.Get(key))
|
||||
}
|
||||
|
||||
func (this *UintInterfaceMap) GetUint (key uint) uint {
|
||||
return gconv.Uint(this.mu.Get(key))
|
||||
return gconv.Uint(this.Get(key))
|
||||
}
|
||||
|
||||
func (this *UintInterfaceMap) GetFloat32 (key uint) float32 {
|
||||
return gconv.Float32(this.mu.Get(key))
|
||||
return gconv.Float32(this.Get(key))
|
||||
}
|
||||
|
||||
func (this *UintInterfaceMap) GetFloat64 (key uint) float64 {
|
||||
return gconv.Float64(this.mu.Get(key))
|
||||
return gconv.Float64(this.Get(key))
|
||||
}
|
||||
|
||||
func (this *UintInterfaceMap) GetString (key uint) string {
|
||||
return gconv.String(this.mu.Get(key))
|
||||
return gconv.String(this.Get(key))
|
||||
}
|
||||
|
||||
// 删除键值对
|
||||
@ -142,9 +142,9 @@ func (this *UintInterfaceMap) Contains(key uint) bool {
|
||||
// 哈希表大小
|
||||
func (this *UintInterfaceMap) Size() int {
|
||||
this.mu.RLock()
|
||||
len := len(this.m)
|
||||
length := len(this.m)
|
||||
this.mu.RUnlock()
|
||||
return len
|
||||
return length
|
||||
}
|
||||
|
||||
// 哈希表是否为空
|
||||
|
||||
1
geg/encoding/gbinary/1.go
Normal file
1
geg/encoding/gbinary/1.go
Normal file
@ -0,0 +1 @@
|
||||
package gbinary
|
||||
Reference in New Issue
Block a user