Use named parameters
This commit is contained in:
parent
2e69cfe104
commit
6a6581b64f
1 changed files with 8 additions and 5 deletions
13
src/main.rs
13
src/main.rs
|
|
@ -141,14 +141,17 @@ fn get_config(_opts: &Opts, config_opts: &ConfigOpts) -> Result<(), anyhow::Erro
|
|||
debug!("endpoint_addr = {:?}", &endpoint_addr);
|
||||
println!(
|
||||
r"[Interface]
|
||||
PrivateKey = {}
|
||||
Address = {}
|
||||
PrivateKey = {private_key}
|
||||
Address = {address}
|
||||
|
||||
[Peer]
|
||||
PublicKey = {}
|
||||
Endpoint = {}
|
||||
PublicKey = {public_key}
|
||||
Endpoint = {endpoint_addr}
|
||||
AllowedIPs = 0.0.0.0/0 #, ::/0",
|
||||
&keys.private_key, &config.data.address, &config.data.public_key, &endpoint_addr
|
||||
public_key = &config.data.public_key,
|
||||
private_key = &keys.private_key,
|
||||
address = &config.data.address,
|
||||
endpoint_addr = &endpoint_addr,
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue