We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 609628c commit de9e29bCopy full SHA for de9e29b
decoder_test.go
@@ -1410,3 +1410,21 @@ func TestDecoderInterface(t *testing.T) {
1410
Equal(t, ok, true)
1411
Equal(t, err.Error(), "form: Decode(non-pointer form.test)")
1412
}
1413
+
1414
+func TestDecoderPointerToPointer(t *testing.T) {
1415
1416
+ values := map[string][]string{
1417
+ "Value": {"testVal"},
1418
+ }
1419
1420
+ type Test struct {
1421
+ Value string
1422
1423
1424
+ var tst *Test
1425
1426
+ d := NewDecoder()
1427
+ err := d.Decode(&tst, values)
1428
+ Equal(t, err, nil)
1429
+ Equal(t, tst.Value, "testVal")
1430
+}
0 commit comments