From f859a2ed1087f4efde9da44af73fb35ae4e845fa Mon Sep 17 00:00:00 2001 From: Ximon Eighteen <3304436+ximon18@users.noreply.github.com> Date: Tue, 15 Apr 2025 12:14:58 +0200 Subject: [PATCH] Re-order dnst commands alphabetically. (#54) * Re-order dnst commands alphabetically. * Also re-order the match block alphabetically. --- src/commands/mod.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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(),