Skip to content
This repository was archived by the owner on Aug 22, 2022. It is now read-only.

Conversation

@rsheasby
Copy link

No description provided.

@saitho
Copy link

saitho commented Aug 21, 2022

I just tried go:embed on two files I included via pkger before.
It worked, but I noticed my binary is larger than before.

With pkger: 27,18 MB
With go:embed: 27,20 MB

@rsheasby
Copy link
Author

rsheasby commented Aug 21, 2022

20 kb or 0.07% smaller isn't really a good reason to keep using pkger.
Fact is pkger doesn't really seem to be maintained anymore, and IIRC @markbates has encouraged using go:embed on the Go Time podcast. I suspect he just hasn't got around to marking the repo archived or updating the readme.

@saitho
Copy link

saitho commented Aug 21, 2022

True, it isn't much. So far I didn't see a reason to use that, if it makes the file slightly larger.
But if @markbates also encourages using go:embed, I'll probably do the switch. :D

@rsheasby
Copy link
Author

rsheasby commented Aug 21, 2022

I may be mistaken, don't quote me on that. But I seem to remember he said something about it on Go Time.

Regardless, that shouldn't be the primary reason for switching. The primary reason for switching is because go:embed is actively maintained and reduces dependencies. pkger is no longer maintained, and if you have one less thing to download and one less potential supply chain attack, it's a no brainer. Plus no more go generate pre-build step required.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants