Skip to content

Commit

Permalink
Make dns record create priority and ttl flags opt (#468)
Browse files Browse the repository at this point in the history
  • Loading branch information
optik-aper authored Jul 29, 2024
1 parent 2a20261 commit 9ff0a7d
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions cmd/dns/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit 9ff0a7d

Please sign in to comment.