-
Notifications
You must be signed in to change notification settings - Fork 782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract CLI code to separate package #1092
Conversation
100c68a
to
afde35e
Compare
Ping anyone? Perhaps @pearkes :) |
Ping. Ping. Any interest in merging this? :) |
Thanks for the PR @syndbg -- I don't think we'll be able to take a look at this too soon given work going on elsewhere in Consul, but we can certainly leave it open until someone is able to invest time in taking a look! |
`go mod init` is all that was executed
Drop `dep` support
Last time this worked was e7889f2 - Aug 26, 2017
They're supposed to be env vars for any builds, not to produce multiple builds.
Makes programmatic usage of consul-template much easier without having to duplicate CLI code
afde35e
to
881c76a
Compare
Hey @syndbg. I'm reviewing all the community PRs for inclusion in 0.22.0 and find this one interesting. I'm thinking about converting much of CT more into a library with front ends for consul template and envconsul, and this looks to be a step toward that. Any interest in rebasing/updating this PR for current master. Things have drifted a bit since you did this. Thanks. |
Yes, sure. |
Hey @syndbg, Thanks for all the work you did on this but it looks like we're going a different route. We're going to be refactoring out all the core "library-worthy" functionality into a separate module. Do you use it as a library? We have an internal document on the API for the library that we're using for discussion and I might be able to get you a copy (or at least cut-n-paste the api spec out) for review. I'm getting feedback from internal library users (both vault and nomad use consul-template as a library) but would love to get additional feedback from community members using it as a library. Anyways. That work would seem to make this PR no longer useful and I was going to close it. I'll wait for a response first (as I tend to miss comments on closed items). Thanks for the time and work you put in on this. |
Sounds good.
We're using it as a library, but it's a very blackbox approach. We use the We don't try to extend template functionality, re-use template functions, etc. E.g production snippet
No prob. |
Hey @syndbg, thanks for the feedback and if you want to look at it the library I'm working on is public and can be found at https://github.com/hashicorp/hcat. It is unreleased and still under heavy development but is coming along. We already use it in another project that is released, so it is working but will still undergo some significant changes. That is you might be interested in taking a look to see how it might fit your use case and submit any feature requests/issues you might have. I created an issue there referring to your comments here so I wouldn't forget about this case. Thanks again. |
Makes programmatic usage of consul-template
much easier without having to duplicate CLI code