[bug] MR#104 Fix handling of empty value. break code.
s7v7nislands opened this issue · 1 comments
s7v7nislands commented
Describe the bug
A clear and concise description of what the bug is.
MR#104 Fix handling of empty value. break code.
Can we set option to keep old behavior?
Versions
Go version:
go version
package version: rungit rev-parse HEAD
inside the repo
Steps to Reproduce
How can the bug be triggered?
use different version. this bug is introduced in v1.0.2
Expected behavior
What output or behaviour were you expecting instead?
v1.0.1 break the code. it should not error.
Code Snippets
A minimum viable code snippet can be useful! (use backticks to format it).
package main
import (
"fmt"
"github.com/gorilla/schema"
"github.com/shopspring/decimal"
)
type Test11 struct {
TT decimal.Decimal `schema:"tt"`
}
func main() {
a := Test11{}
decoder := schema.NewDecoder()
err := decoder.Decode(&a, map[string][]string{"tt":[]string{""}})
if err != nil {
fmt.Printf("err: %v\n", err)
}
fmt.Printf("tt: %v\n", a)
}
stale commented
This issue has been automatically marked as stale because it hasn't seen a recent update. It'll be automatically closed in a few days.