Live data from Hacker News

Go-Restructure: Sane regular expressions with struct fields

github.com

1–10 of 47 posts

Re: Go-Restructure: Sane regular expressions with struct fields

#3
post #2

Very very very elegant approach to the problem. I know I'll be using it.

Agreed, it minimizes the friction in going from regex to usable data structure more than any previous solution I've seen.

Really makes me appreciate the value of Go's field tags.

Re: Go-Restructure: Sane regular expressions with struct fields

#8
post #7
post #4

Neat. It could adopt the key:"value" convention of other struct tag libraries (e.g. json:"name" xml:"name") to make it more composable.

Agreed. I think "re" would be a good and succinct key. Or "regex" if you wanna go more explicit.

https://github.com/alexflint/go-restructure/issues/2
Post reply on HN