This website works better with JavaScript.
Home
Explore
Help
Sign In
tgo
/
helper
Watch
6
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Projects
0
Releases
32
Wiki
Activity
Browse Source
修改HttpBuildQuery
master
v0.1.6
guzeng
3 years ago
parent
2f5cf759be
commit
53fc6ccc37
2 changed files
with
2 additions
and
2 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
map.go
+1
-1
map_test.go
+ 1
- 1
map.go
View File
@ -112,7 +112,7 @@ func HttpBuildQuery(data map[string]string) string {
var
query
string
for
_
,
value
:=
range
keySlice
{
if
data
[
value
]
!=
""
{
if
value
!=
""
&&
data
[
value
]
!=
""
{
query
+=
StringJoin
(
value
,
"="
,
data
[
value
]
,
"&"
)
}
}
+ 1
- 1
map_test.go
View File
@ -6,7 +6,7 @@ import (
func
Test_HttpBuildQuery
(
t
*
testing
.
T
)
{
list
:=
map
[
string
]
string
{
"a"
:
"b"
,
"
c
"
:
"cdd"
,
"b"
:
""
}
list
:=
map
[
string
]
string
{
"a"
:
"b"
,
""
:
"cdd"
,
"b"
:
""
}
ret
:=
HttpBuildQuery
(
list
)
Write
Preview
Loading…
Cancel
Save