Skip to content
Snippets Groups Projects
Commit 4cdba57a authored by Georgy Moshkin's avatar Georgy Moshkin :speech_balloon:
Browse files

fix: support try_parse_address for peer arguments

parent ac613981
No related branches found
No related tags found
1 merge request!75chore: use clap v3 instead of struct_opt
Pipeline #4030 passed
...@@ -49,7 +49,7 @@ pub struct Run { ...@@ -49,7 +49,7 @@ pub struct Run {
#[clap( #[clap(
long, long,
value_name = "host[:port]", value_name = "[host][:port]",
env = "PICODATA_ADVERTISE_ADDRESS", env = "PICODATA_ADVERTISE_ADDRESS",
parse(try_from_str = try_parse_address) parse(try_from_str = try_parse_address)
)] )]
...@@ -59,7 +59,7 @@ pub struct Run { ...@@ -59,7 +59,7 @@ pub struct Run {
#[clap( #[clap(
short = 'l', short = 'l',
long = "listen", long = "listen",
value_name = "host[:port]", value_name = "[host][:port]",
parse(try_from_str = try_parse_address), parse(try_from_str = try_parse_address),
default_value = "localhost:3301", default_value = "localhost:3301",
env = "PICODATA_LISTEN" env = "PICODATA_LISTEN"
...@@ -69,9 +69,10 @@ pub struct Run { ...@@ -69,9 +69,10 @@ pub struct Run {
#[clap( #[clap(
long = "peer", long = "peer",
value_name = "host[:port]", value_name = "[host][:port]",
require_value_delimiter = true, require_value_delimiter = true,
use_value_delimiter = true, use_value_delimiter = true,
parse(try_from_str = try_parse_address),
required = true, required = true,
env = "PICODATA_PEER" env = "PICODATA_PEER"
)] )]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment