markbates / pkger

Embed static files in Go binaries (replacement for gobuffalo/packr)
MIT License
1.19k stars 60 forks source link

Don't force the package to 'main' if the '-o' option was used. #67

Closed al45tair closed 4 years ago

al45tair commented 4 years ago

It looks like the problem is that pkger gets the information for the current directory, then appends the path from the '-o' option, but that means that the package name will always be main if it's started from the main package, regardless of '-o'.

Fixes #56.

al45tair commented 4 years ago

@markbates Any chance you could take a look at this and (hopefully) merge it?

al45tair commented 4 years ago

Can also please add tests around this to prevent regression? Thanks.

I don't think, having reviewed the repo, that there are any existing tests for the things in the cmd directory (and I note that when you made the change that resulted in this problem, you didn't add any regression tests).

I'm not averse to adding something, but you'll have to be reasonably specific about what you want and where you want it. If I make decisions about your project layout for you, my guess is that you're likely to reject them, which will result in unnecessary back and forth and wasted time at my end, which neither of us really wants.

al45tair commented 4 years ago

Guess this is officially "fixed".