Magic characters when decoding URLs
stephenafamo opened this issue · 4 comments
stephenafamo commented
Not sure why, but URLs are not being decoded properly.
The url.URL type implements the BinaryUnmarshaler interface (https://golang.org/pkg/net/url/#URL.UnmarshalBinary)
However, when used in a config struct, the unmarshaling adds an @
see this (https://play.golang.org/p/VrZDD85bR6j)
sethvargo commented
That's... interesting. The @
symbol doesn't actually appear in any Go files, so this should be fun to debug...
sethvargo commented
Hmm okay, so the @
is appearing because during marshal/unmarshal, "User" is being set to a value somehow...
Field: url.URL{
Scheme: "http",
Opaque: "",
- User: nil,
+ User: s"",
Host: "simple.test",
Path: "/",
... // 4 identical fields
},
}
stephenafamo commented
Works now. Great work.
github-actions commented
This issue has been automatically locked since there has not been any
recent activity after it was closed. Please open a new issue for
related bugs.