來自net / http的源代碼。的定義http.Header是map[string][]string。正確的?但是為什么要go run在下面的代碼中得到結果:02個func main() { var header = make(http.Header) header.Add("hello", "world") header.Add("hello", "anotherworld") var t = []string {"a", "b"} fmt.Printf("%d\n", len(header["hello"])) fmt.Print(len(t))}
- 2 回答
- 0 關注
- 160 瀏覽
添加回答
舉報
0/150
提交
取消