diff --git a/src/commands/mod.rs b/src/commands/mod.rs index 8d2a211..0f7832c 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -45,6 +45,14 @@ pub enum Command { #[command(name = "keygen", verbatim_doc_comment)] Keygen(self::keygen::Keygen), + /// Generate a DS RR from the DNSKEYS in keyfile + /// + /// The following file will be created for each key: + /// `K++.ds`. The base name `K++` + /// will be printed to stdout. + #[command(name = "key2ds")] + Key2ds(key2ds::Key2ds), + /// Print the NSEC3 hash of a given domain name #[command(name = "nsec3-hash")] Nsec3Hash(self::nsec3hash::Nsec3Hash), @@ -57,14 +65,6 @@ pub enum Command { #[command(name = "notify")] Notify(self::notify::Notify), - /// Generate a DS RR from the DNSKEYS in keyfile - /// - /// The following file will be created for each key: - /// `K++.ds`. The base name `K++` - /// will be printed to stdout. - #[command(name = "key2ds")] - Key2ds(key2ds::Key2ds), - /// Send an UPDATE packet #[command(name = "update")] Update(self::update::Update), @@ -83,9 +83,9 @@ pub enum Command { impl Command { pub fn execute(self, env: impl Env) -> Result<(), Error> { match self { + Self::Key2ds(key2ds) => key2ds.execute(env), Self::Keygen(keygen) => keygen.execute(env), Self::Nsec3Hash(nsec3hash) => nsec3hash.execute(env), - Self::Key2ds(key2ds) => key2ds.execute(env), Self::Notify(notify) => notify.execute(env), Self::Update(update) => update.execute(env), Self::Help(help) => help.execute(),