ThalesGroup/helm-spray

Use it as library + version go package

Closed this issue · 3 comments

Hi,
Your Helm plugin is really very handy, I was looking for a tool that exactly answered this problem. Thanks to you!

I would like to create an HTTP wrapper of your tool in order to use it as a micro service.

But I tried to use it as a Go library, and it wasn't designed as such.
The "main" spray function is not exportable.
Named spray() instead of Spray() in Go to make it exportable and use it as a library / SDK.

In addition, I would also like to use version v4.x for support with Helm 3.
But it is not up to date on the repo of the Go packages.
https://pkg.go.dev/github.com/ThalesGroup/helm-spray?tab=versions

Do you plan to update?
Do you have an "SDK" version, to use it as a library?

If I fork it, to make a Go module usable as an SDK, would you be interested?

Thanks to you,
And thank you again for your great project!

Hello,

Thanks for using helm-spray !

It is definitively a good idea for the library : in the next version, we will declare it public so you can use it through a Go library

Now, I just need to understand why today the 4.x is not publised on pkg.go.dev just like 3.x. It is probably related to the fact we are now using modules to build 4.x...

Hello,

As requested, I moved the spray logic in a public package and then published 4.0.2.

This version and its package appear in pkg.go.dev, as I had to follow the rules to publish modules whose API major version is > 1 (see https://blog.golang.org/v2-go-modules)

Hope it will help !

Hello,
Thank you for you reactivity !
I'm going to try Helm Spray in library mode right now !
Have a nice day