soroban_cli/commands/network/
rm.rs

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