serverless-go-plugin icon indicating copy to clipboard operation
serverless-go-plugin copied to clipboard

Include extra files

Open baderkha opened this issue 1 year ago • 1 comments

So for some go applications i have some extra json files i want to include with the build zip that i will read in go with a os.ReadFile() call.

i see in line 168 you have

zip.addFile("bootstrap", readFileSync(binPath), "", 0o755);

can we expose a property to include custom files. or is there a workaround i can use right now even if it's a little hacky

baderkha avatar Sep 27 '23 17:09 baderkha

I actually hade the same use case a while ago and made a PR to be able to include files in the zip.

Since then I've changed my mind and removed the PR. Instead, I would suggest you use the embed package in Go https://pkg.go.dev/embed

alexanderwink avatar Mar 23 '24 11:03 alexanderwink