gorilla/schema — pull request #25 by sqs (2014-05-02 11:56:30+00:00)
Title: Support multiple-level embedded structs

Currently, this library doesn't support decoding into a struct with multiple-level embedded structs. See TestMultipleLevelEmbeddedField in this PR for an example:

```go
type S9 struct {
Id string
}

type S10 struct {
S9
}

type S11 struct {
S10
}

func TestMultipleLevelEmbeddedField(t *testing.T) {
data := map[string][]string{
"Id": {"identifier"},
}
s := &S11{}
err := NewDecoder().Decode(s, data)
if s.Id != "identifier" {
t.Errorf("Missing support for multiple-level embedded fields (%v)", err)
}
}
```

Without the other changes in this PR, that test case fails with the following message:

```
--- FAIL: TestMultipleLevelEmbeddedField-8 (0.00 seconds)
decoder_test.go:699: Missing support for multiple-level embedded fields (schema: invalid path "Id")
```

This PR adds support for multiple-level embedded fields. All tests pass.