?select[0]=id,client_id,timout&select[1]=more,fields&data=test
字符串如何将此查询字符串加载到[]字符串中?
[]string{ "id,client_id,timout", "more,fields", }
型
iszxjhcz1#
The standard way to pass a list of values as URL parameters is to repeat them。如果使用以下语法:
?select=id,client_id,timout&select=more,fields&data=test
字符串URL.Query()将返回a Values map[string][]string that will already contain under select:
URL.Query()
Values map[string][]string
select
[]string{"id,client_id,timout", "more,fields"}
1条答案
按热度按时间iszxjhcz1#
The standard way to pass a list of values as URL parameters is to repeat them。如果使用以下语法:
字符串
URL.Query()
将返回aValues map[string][]string
that will already contain underselect
:型