mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
Refactor in preparation to unexport RecordConfig.{Name,NameFQDN,Target} (#337)
* Preparing for the unexport of Name/NameFQDN/Target * Cleanups
This commit is contained in:
@ -2,7 +2,7 @@ package models
|
||||
|
||||
// SetTargetTXT sets the TXT fields when there is 1 string.
|
||||
func (rc *RecordConfig) SetTargetTXT(s string) error {
|
||||
rc.Target = s
|
||||
rc.SetTarget(s)
|
||||
rc.TxtStrings = []string{s}
|
||||
if rc.Type == "" {
|
||||
rc.Type = "TXT"
|
||||
@ -15,7 +15,7 @@ func (rc *RecordConfig) SetTargetTXT(s string) error {
|
||||
|
||||
// SetTargetTXTs sets the TXT fields when there are many strings.
|
||||
func (rc *RecordConfig) SetTargetTXTs(s []string) error {
|
||||
rc.Target = s[0]
|
||||
rc.SetTarget(s[0])
|
||||
rc.TxtStrings = s
|
||||
if rc.Type == "" {
|
||||
rc.Type = "TXT"
|
||||
|
Reference in New Issue
Block a user