[go: up one dir, main page]

Skip to content

Commit

Permalink
add lowercase checks
Browse files Browse the repository at this point in the history
  • Loading branch information
giornetta committed Nov 4, 2024
1 parent 266188c commit e615b80
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmd/domain/domain_record_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,27 +45,27 @@ var domainRecordCreateCmd = &cobra.Command{
// Sanitace the record type
recordType = strings.ReplaceAll(recordType, " ", "")

if recordType == "A" || recordType == "alias" {
if recordType == "A" || recordType == "a" || recordType == "alias" {
newRecordConfig.Type = civogo.DNSRecordTypeA
}

if recordType == "CNAME" || recordType == "canonical" {
if recordType == "CNAME" || recordType == "cname" || recordType == "canonical" {
newRecordConfig.Type = civogo.DNSRecordTypeCName
}

if recordType == "MX" || recordType == "mail" {
if recordType == "MX" || recordType == "mx" || recordType == "mail" {
newRecordConfig.Type = civogo.DNSRecordTypeMX
}

if recordType == "TXT" || recordType == "text" {
if recordType == "TXT" || recordType == "txt" || recordType == "text" {
newRecordConfig.Type = civogo.DNSRecordTypeTXT
}

if recordType == "SRV" || recordType == "service" {
if recordType == "SRV" || recordType == "srv" || recordType == "service" {
newRecordConfig.Type = civogo.DNSRecordTypeSRV
}

if recordType == "NS" || recordType == "nameserver" {
if recordType == "NS" || recordType == "ns" || recordType == "nameserver" {
newRecordConfig.Type = civogo.DNSRecordTypeNS
}

Expand Down

0 comments on commit e615b80

Please sign in to comment.