Golang中实现Python里面in操作的方法
摘要:package in_optrator import ( "fmt" "github.com/emirpasic/gods/sets/hashset" "testing" ) func TestInOperation(t *testing.T) { // New可以方不同类型的元素 h1 := ha
阅读全文
posted @
2021-09-12 11:33
江湖乄夜雨
阅读(176)
推荐(0) 编辑
Golang中map转结构体的不同方法
摘要:使用第三方模块mapstructure go get github.com/mitchellh/mapstructure ~~~ 带下划线的字段需要特殊处理一下❗️❗️❗️ // 对于带 下划线命名 的变量,需要特殊方法解析 type CurrUser struct { Name string `j
阅读全文
posted @
2021-09-06 15:23
江湖乄夜雨
阅读(1501)
推荐(0) 编辑