concurrent-map icon indicating copy to clipboard operation
concurrent-map copied to clipboard

该如何初始化复杂的类型, 类型定义如下

Open lwp145 opened this issue 2 years ago • 1 comments

type DetailInfo struct { Summary Summary json:"summary"Detail map[string]*Url_Request_Infojson:"detail"` }

type Summary struct { Url_Request_Info Url_Request_Info json:"url_request_info" Paths []string json:"paths" }

type Url_Request_Info struct{ Total int json:"total" Code_200 int json:"code_200" Code_400 int json:"code_400" Code_403 int json:"code_403" Code_404 int json:"code_404" Code_408 int json:"code_408" Code_500 int json:"code_500" Code_503 int json:"code_503" }`

lwp145 avatar Jan 17 '23 09:01 lwp145

用NewWithCustomShardingFunction试试,需要自己实现Hash

JHue58 avatar Jul 11 '24 07:07 JHue58