@@ -59,6 +59,11 @@ func (b *paramBinder) UnmarshalBind(param string) error {
59
59
return err
60
60
}
61
61
62
+ type AnonymousString string
63
+ type AnonymousStruct struct {
64
+ Embed string `query:"Embed"`
65
+ }
66
+
62
67
func TestBindURLValues (t * testing.T ) {
63
68
type T struct {
64
69
Bool bool `query:"bool"`
@@ -82,6 +87,8 @@ func TestBindURLValues(t *testing.T) {
82
87
83
88
BindUnmarshaler `query:"anonymous1"`
84
89
paramBinder `query:"anonymous2"`
90
+ AnonymousStruct `query:"anonymous3"`
91
+ AnonymousString `query:"anonymous4"`
85
92
86
93
Ingore int `query:"-"`
87
94
Ptr * int
@@ -110,6 +117,8 @@ func TestBindURLValues(t *testing.T) {
110
117
"interface1" : []string {"41" },
111
118
"interface2" : []string {"42" },
112
119
"anonymous1" : []string {"43" },
120
+ "anonymous4" : []string {"44" },
121
+ "Embed" : []string {"45" },
113
122
114
123
"Ptr" : []string {"51" },
115
124
"Value" : []string {"51" },
@@ -140,6 +149,8 @@ func TestBindURLValues(t *testing.T) {
140
149
Interface1 : paramBinder {41 },
141
150
Interface2 : & paramBinder {42 },
142
151
BindUnmarshaler : & paramBinder {43 },
152
+ AnonymousString : "44" ,
153
+ AnonymousStruct : AnonymousStruct {Embed : "45" },
143
154
144
155
paramBinder : paramBinder {int1 },
145
156
Ptr : & int1 ,
0 commit comments