go-restructure
go-restructure copied to clipboard
Add int parsing ?
Hello,
Was wondering if it's possible to extract int values, here is my code that failed.
type Dummy struct {
_ struct{} `regexp:"^"`
DummyInt int `regexp:"\\d"`
_ struct{} `regexp:"$"`
}
var dummy Dummy
restructure.Find(&dummy, "1")
fmt.Println(dummy.DummyInt)
May be I'm missing some simple way to do it since I'm discovering go.
Thank you.
Yes this would be a good thing to support. Could use github.com/alexflint/go-scalar.