Open dschissler opened 4 years ago
your can try "pkger -o cmd/server"
I am running in to the same issue. Pre-compiled with pkger
it worked fine, but since I have my entrypoint in cmd/myproject/main.go
it will not work with files on the filesystem.
To make it more confusing for new users such as myself, pkger list
seems to indicate that it will work fine, but doesn't unless you run pkger
first.
If I first generate the
pkged.go
file then runninggo run cmd/server/main.go
will work correctly. However if I don't first generate the file then it will fail. However if I simply movecmd/server/main.go
to the project root then it will work correctly without needing to generate anything.So the current workaround seems to be putting my entry go file in the project root. I think that bug #109 might be referencing a similar traversal issue.
I think that this could be a common blocker bug that makes many people think that the tech just doesn't work correctly. I'm only just learning now. Many guides recommend putting the entry into the cmd folder in this way. So with these skeletons pkger is Dead On Arrival. I don't know what I'm doing so its really crazy to copy over the example code into my project and have it fail.