You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Mon, Nov 20, 2017 at 1:18 AM turtleDev ***@***.***> wrote:
package something
import (
"github.com/gorilla/schema)var decoder = schema.NewDecoder().IgnoreUnknownKeys()
The syntax above is valid go, and is how the docs suggest you use gorilla
(keeping a global instance)
however, doing this won't be valid
package somethingimport (
"github.com/gorilla/schema"
)
var decoder = schema.NewDecoder()
decoder.IgnoreUnknownKeys() // syntax-error: non-declaration statement outside function body
Sounds like a simple enough change. I'd be happy to send a PR.
What do you guys think?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#93>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABIcNLiGClN3jG-Aj2YTspHi-v949RVks5s4UPpgaJpZM4Qj8zR>
.
turtleDev
added a commit
to turtleDev/schema
that referenced
this issue
Nov 28, 2017
This patch updates configuration methods on Encoder and Decoder.
In specific, the configuration methods now return a pointer to
the instance on which those methods were called. This facilities
method chaning in the instance declaration.
The syntax above is valid go, and is how the docs suggest you use gorilla (keeping a global instance)
however, doing this won't be valid
Sounds like a simple enough change. I'd be happy to send a PR.
What do you guys think?
The text was updated successfully, but these errors were encountered: