-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
cmd: export CaddyVersion(), Commands() #4316
Conversation
Do you mind pasting the output of this new command in a Gist or something? Hard to envision what the template's output would look like without running it |
Yeah, I think an external module would be best for this. Instead of exporting the |
Sounds good. I will look into that |
Nice! Thanks for the preview! We'll probably want to commit these to the We can probably also add a step in CI to automatically regenerate them for |
Did some clean up and made it a module Some notes: I have added I have also exported I also looked at other source files and tried to be comparably explicit with comments throughout the file (maybe even too explicit?) Please let me know what you think |
Yep, exporting those two functions like that works, I'd say. Nice job. I think we should put this module in a new repo. Maybe The changes to Caddy that export the functions can stay or be opened in a new PR. |
It doesn't necessarily need to be in a new repo, we could put it in |
Sure, that's an option too. Or just dist/manpages. |
opened PR here: caddyserver/dist#73 |
forgot to go fmt 😬 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for the simple change, looking forward to some legit man pages :)
Initial draft adressing caddyserver/dist#29
Because it's not yet clear where to put this package, I have put all code in one single file.
As considered by @mholt, I could probably rewrite this as a Caddy module. However I think this would require exporting the "commands" variable from caddycmd, I am not sure if that could be a problem. Please let me know what you think