Rename list() to list_endpoints()

This commit is contained in:
Andrey Golovizin 2021-06-29 23:15:30 +02:00
parent 4abc08a34b
commit fb2fc57715

View file

@ -82,14 +82,14 @@ fn main() -> Result<(), anyhow::Error> {
env_logger::init();
let opts = Opts::parse();
match &opts.command {
Command::Endpoints => list(&opts)?,
Command::Endpoints => list_endpoints(&opts)?,
Command::Config(get_config_opts) => get_config(&opts, &get_config_opts)?,
Command::Check => check(&opts)?,
}
Ok(())
}
fn list(opts: &Opts) -> Result<(), anyhow::Error> {
fn list_endpoints(opts: &Opts) -> Result<(), anyhow::Error> {
let locations: Locations = get_locations()?;
if opts.json {
println!("{}", serde_json::to_string(&locations)?);