Docker image with go-enum
Could you please provide an "official" multi-arch docker image to use this tool? It can be simply deployed to the ghcr.io, for example. Use case - a more simple installation in the docker context, like:
COPY --from=abice/go-enum:v0.5.5 /usr/local/bin/go-enum /bin/go-enum
If you need help with it, I can make a PR with the required changes.
Sounds like a reasonable request... I'll see what I can do
Just as an example (it can be helpful to you)
@abice Any news on it?
Haven't had time to work on it, sorry!
Oh... I'm waiting for it very much :(
Same for me! I can contribute if necessary, @abice. Just give me a shout. :relieved:
~I've added a docker image... abice/go-enum:0.5.9 as the starting point.~
~Please let me know if there are any issues using the image, thanks!~
This is not working yet... still working out the bugs 😄 sorry!
And just for everyone's information, apparently despite the fact that I imported the goimports tool, it actually makes a call to the go binary for at least getting the go environment information. I'm not sure how I want to get around this at the moment, and will take a sec to figure that out. Sorry about getting your hopes up 😞
Alright, so I'm going to leave this ticket open as a reminder that I need to figure out how to run the go-enum binary without the go binary installed (or at least a smaller image to do so)... but for now, you can use the image abice/go-enum:0.5.10 successfully.
I've updated some of my makefiles to look like this, and they successfully generate the enums correctly.
GOENUM = docker run -w /app -v $(shell pwd):/app abice/go-enum:$(GOENUM_VERSION)
GOENUM_VERSION=0.5.10
%_enum.go: %.go go.sum
$(GOENUM) -f $*.go $(GO_ENUM_FLAGS)
If anyone has an idea of how to get the go-enum binary to do the goimports functionality without executing a go binary, I'm open to suggestions!