soroban_cli/commands/network/rm.rs
1use crate::config::address::NetworkName;
2
3use super::locator;
4
5#[derive(thiserror::Error, Debug)]
6pub enum Error {
7 #[error(transparent)]
8 Locator(#[from] locator::Error),
9}
10
11#[derive(Debug, clap::Parser, Clone)]
12#[group(skip)]
13pub struct Cmd {
14 /// Network to remove
15 pub name: NetworkName,
16
17 #[command(flatten)]
18 pub config: locator::Args,
19}
20
21impl Cmd {
22 pub fn run(&self) -> Result<(), Error> {
23 Ok(self.config.remove_network(&self.name)?)
24 }
25}