Closed nlepage closed 5 years ago
Hi,
It seems that the embed impl won't work with the new -o option.
Here's a diff of the walk example showing the problem:
diff --git a/examples/walk/pkger/Makefile b/examples/walk/pkger/Makefile index dd14cf3..a04eaee 100644 --- a/examples/walk/pkger/Makefile +++ b/examples/walk/pkger/Makefile @@ -1,5 +1,5 @@ default: - pkger + pkger -o pkged GOOS=linux go build -v -o example docker build -t pkger:example . docker run -p 3000:3000 pkger:example diff --git a/examples/walk/pkger/main.go b/examples/walk/pkger/main.go index 450d65e..3bb583d 100644 --- a/examples/walk/pkger/main.go +++ b/examples/walk/pkger/main.go @@ -8,6 +8,8 @@ import ( "time" "github.com/markbates/pkger" + + _ "app/pkged" ) func main() { diff --git a/examples/walk/pkger/pkged/package.go b/examples/walk/pkger/pkged/package.go new file mode 100644 index 0000000..dee4673 --- /dev/null +++ b/examples/walk/pkger/pkged/package.go @@ -0,0 +1 @@ +package pkged
Here's what I did:
app/pkged
package.go
main.go
Go run the example without running pkger works fine.
After running pkger -o pkged doesn't work anymore.
pkger -o pkged
I'm not sure how to write a test for this... but the fix works for the walk example and hopefully for all the other cases.
Thank you for your work.
Thanks! This is in v0.12.1.
v0.12.1
Hi,
It seems that the embed impl won't work with the new -o option.
Here's a diff of the walk example showing the problem:
Here's what I did:
app/pkged
with just apackage.go
main.go
Go run the example without running pkger works fine.
After running
pkger -o pkged
doesn't work anymore.I'm not sure how to write a test for this... but the fix works for the walk example and hopefully for all the other cases.
Thank you for your work.