We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
4.4.0
Writing version and daemon managers. So you begin by downloading, installing, and starting a package. Then you stop, install-service (daemon).
download
install
start
stop
install-service
Either by including all the arguments with you every step of the way, or using a config file.
My use case:
version
To give a concrete of what the JSON would look like:
{ "15.3.1": { "Port": 5430, "Database": "my_15_3_db", "Username": "thespp", "Password": "cxvsd", }, "15.4.0": { "Port": 5432, "Database": "my_15_4_db", "Username": "cvxvx", "Password": "45j45lF", } }
Working prototype (in Go, but planning a Rust rewrite): https://github.com/offscale/postgres-version-manager-go
I suppose I could use https://github.com/aobatact/clap-serde
Or straight up serde on the struct in question and use it that way. But there seems to be a lot of intricacies to consider, like how do I know when:
serde
struct
Also how do I deserialise it with a version per JSON key. It was pretty hacky to get working in Go.
Related: #3113
That way you can either provide this JSON file in a --config or it will use the default location (assuming you don't have --no-config-write set).
--config
--no-config-write
The text was updated successfully, but these errors were encountered:
Closing in favor of #2763
Sorry, something went wrong.
No branches or pull requests
Please complete the following tasks
Clap Version
4.4.0
Describe your use case
Writing version and daemon managers. So you begin by
download
ing,install
ing, andstart
ing a package. Then youstop
,install-service
(daemon).Either by including all the arguments with you every step of the way, or using a config file.
Describe the solution you'd like
My use case:
version
→ all provided CLI arguments (uses ENV if not provided otherwise the default value)To give a concrete of what the JSON would look like:
Alternatives, if applicable
Working prototype (in Go, but planning a Rust rewrite): https://github.com/offscale/postgres-version-manager-go
I suppose I could use
https://github.com/aobatact/clap-serde
Or straight up
serde
on thestruct
in question and use it that way. But there seems to be a lot of intricacies to consider, like how do I know when:Also how do I deserialise it with a version per JSON key. It was pretty hacky to get working in Go.
Additional Context
Related: #3113
That way you can either provide this JSON file in a
--config
or it will use the default location (assuming you don't have--no-config-write
set).The text was updated successfully, but these errors were encountered: