-
Notifications
You must be signed in to change notification settings - Fork 39
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
Autogenerate docs for all envbuilder flags #130
Comments
@mtojek my plans for this task:
Do you think these steps make sense? |
Sounds good to me! Only few comments:
Yeah I would assume so as in this case results, generated docs, could be reviewed manually in PRs.
Yes, must have. |
The current type Options struct {
// SetupScript is ran as the root user prior to the init script.
// It is used to configure envbuilder dynamically during the runtime.
// e.g. specifying whether to start `systemd` or `tiny init` for PID 1.
SetupScript string `env:"SETUP_SCRIPT"`
} From this current structure I can get the flag name: 1. Create a tag called
|
Ammar created coder/serpent to build nice CLI interfaces. If you need to adjust structures, I would recommend migrating to this project, and... that matches solution no 2. with a separate property for description. Maybe consider building the docsgen for serpent as a new OSS project? |
I like this idea 👍
I like this idea too, but I would make it a separate issue/milestone. |
@mtojek taking a closer look at the envbuilder code, it looks like envbuilder was not intended to be a CLI 😅 so it might make sense to update its types internally. |
Technically yes, but you can map ENV variables to CLI flags 👍 |
I'd be in favor of allowing all envbuilder settings to be adjusted with both flags and environment variables. This may also help in testing envbuilder functionality. Also, if you're looking to parse Go source files @BrunoQuaresma, I'd recommend taking a look at: https://github.com/dave/dst. Utilizing that, you can get comments as well. |
This would be much simpler :)
Please nooo ... :D |
Ok, after some thought I'm going to play around with the idea of transforming envbuilder into a CLI using coder/serpent. I will share my progress here over the next few days. |
There are many flags in envbuilder.go that are not documented in the README. We should document this in a README or another place and make it auto-generated
The text was updated successfully, but these errors were encountered: