完成map包装类型 - key是否存在
This commit is contained in:
21
map_test.go
Normal file
21
map_test.go
Normal file
@ -0,0 +1,21 @@
|
||||
// Package wrapper ...
|
||||
//
|
||||
// Description : wrapper ...
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 2024-11-06 18:37
|
||||
package wrapper
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestMap_Exist(t *testing.T) {
|
||||
testData := Map(map[string]any{
|
||||
"name": "zhang",
|
||||
})
|
||||
fmt.Println(testData.Exist("name"))
|
||||
fmt.Println(testData.Exist("age"))
|
||||
}
|
Reference in New Issue
Block a user