From 9ff0a7d39956dcf8d2d2cf22ba83fa16709e0718 Mon Sep 17 00:00:00 2001 From: Michael Riley Date: Mon, 29 Jul 2024 14:38:40 -0400 Subject: [PATCH] Make dns record create priority and ttl flags opt (#468) --- cmd/dns/dns.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/cmd/dns/dns.go b/cmd/dns/dns.go index 9b834a2..3a83ee6 100644 --- a/cmd/dns/dns.go +++ b/cmd/dns/dns.go @@ -454,16 +454,7 @@ func NewCmdDNS(base *cli.Base) *cobra.Command { //nolint:funlen,gocyclo } recordCreate.Flags().IntP("ttl", "l", 0, "ttl for the record") - if err := recordCreate.MarkFlagRequired("ttl"); err != nil { - fmt.Printf("error marking dns record create 'ttl' flag required: %v", err) - os.Exit(1) - } - - recordCreate.Flags().IntP("priority", "p", 0, "only required for MX and SRV") - if err := recordCreate.MarkFlagRequired("priority"); err != nil { - fmt.Printf("error marking dns record create 'priority' flag required: %v", err) - os.Exit(1) - } + recordCreate.Flags().IntP("priority", "p", -1, "only required for MX and SRV") // Record Delete recordDelete := &cobra.Command{