Skip to content

how to use PathBuf has default value (config file) #5221

Answered by epage
nbari asked this question in Q&A
Discussion options

You must be logged in to vote

Wow, github mobile made this hard to follow and respond to the correct thing.

Is there any room to make it cleaner or best practices to follow?

Overall, I've taken the approach that the builder API is the lower level, more complex API. Without a custom value parser (using just built-ins), you automatically get alignment between the value_parser and the get_one calls. With a custom value parser, there can be mistakes like this. Using something like clio's OsStrParser can help.

So with that background, there are likely things we can improve.

  • clio is linked to from the main docs as a related product but could likely be called out more.
  • We do need to make a builder version of the typed val…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@nbari
Comment options

@nbari
Comment options

Comment options

You must be logged in to vote
2 replies
@epage
Comment options

@epage
Comment options

Answer selected by nbari
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants