How to parse key-value pairs? #3057
Answered
by
epage
danieleades
asked this question in
Q&A
-
I'm wanting to parse key-value pairs using the newer declarative syntax. structopt has an example of exactly this - https://github.com/TeXitoi/structopt/blob/01d34fb8d2e6595e4b84d353d50281466f05dc9e/examples/keyvalue.rs but this doesn't work with clap beta-5 returns the following error:
despite the fact that the path is a function. How should this be done using Clap? |
Beta Was this translation helpful? Give feedback.
Answered by
epage
Dec 4, 2021
Replies: 1 comment 4 replies
-
All of the examples have been ported over. See https://github.com/clap-rs/clap/blob/master/clap_derive/examples/keyvalue.rs |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
danieleades
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
All of the examples have been ported over. See https://github.com/clap-rs/clap/blob/master/clap_derive/examples/keyvalue.rs