#asknostr #devstr #go #k8s

Working on my Strfry deployment and I want to implement key whitelisting. There is a neat go library here: https://github.com/jiftechnify/strfrui

Now, I will need to pre-build that binary as part of an initContainer, each time. So, I would like to employ a little hackery with go:generate. Is there a tool that can generate the whole thing for me? i.e.:

//go:generate json2go whitelisted.json

func main...

And it generates another `package main` file that has the string array inside that I can use for strfui.

Any idea?

Reply to this note

Please Login to reply.

Discussion

No replies yet.