mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
@ -3,7 +3,6 @@ package models
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// SetTargetCAA sets the CAA fields.
|
||||
@ -37,7 +36,10 @@ func (rc *RecordConfig) SetTargetCAAStrings(flag, tag, target string) error {
|
||||
// SetTargetCAAString is like SetTargetCAA but accepts one big string.
|
||||
// Ex: `0 issue "letsencrypt.org"`
|
||||
func (rc *RecordConfig) SetTargetCAAString(s string) error {
|
||||
part := strings.Fields(s)
|
||||
part, err := ParseQuotedFields(s)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if len(part) != 3 {
|
||||
return fmt.Errorf("CAA value does not contain 3 fields: (%#v)", s)
|
||||
}
|
||||
|
Reference in New Issue
Block a user