New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove go.rice in favour of go generate #444
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Great work @adambabik.
rice embed-go | ||
generate: dist-fetch/bundle.js | ||
go generate . | ||
gofmt -s -w dist_fetch.go |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure simplify option (-s
) has any benefit here for autogenerated code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might not but I don't see any negative impact having -s
.
dist-fetch.rice-box.go: dist-fetch/bundle.js | ||
rice embed-go | ||
generate: dist-fetch/bundle.js | ||
go generate . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any //go:generate
comments in code. Did you run go-bindata
manually to produce dist-fetch.go
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wow, missed it, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+268 −2,605
is another nice argument.
As fetch.go was the only consumer of go.rice, it could be safely removed in favour of go-bindata and go generate.
Motivation to do that was the fact that
go.rice
throws panic in iOS when compiled with gomobile.