1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

CHORE: Linting and comment-fixing (#2937)

This commit is contained in:
Tom Limoncelli
2024-05-07 14:47:28 -04:00
committed by GitHub
parent 6817e08baa
commit 1fa92de07e
7 changed files with 14 additions and 3 deletions

View File

@ -150,6 +150,7 @@ func (dc *DomainConfig) Punycode() error {
return nil
}
// StoreCorrections accumulates corrections in a thread-safe way.
func (dc *DomainConfig) StoreCorrections(providerName string, corrections []*Correction) {
dc.pendingCorrectionsMutex.Lock()
defer dc.pendingCorrectionsMutex.Unlock()
@ -171,6 +172,7 @@ func (dc *DomainConfig) StoreCorrections(providerName string, corrections []*Cor
}
}
// GetCorrections returns the accumulated corrections for providerName.
func (dc *DomainConfig) GetCorrections(providerName string) []*Correction {
dc.pendingCorrectionsMutex.Lock()
defer dc.pendingCorrectionsMutex.Unlock()

View File

@ -497,6 +497,7 @@ func (rc *RecordConfig) Key() RecordKey {
return RecordKey{rc.NameFQDN, t}
}
// GetSVCBValue returns the SVCB Key/Values as a list of Key/Values.
func (rc *RecordConfig) GetSVCBValue() []dns.SVCBKeyValue {
record, err := dns.NewRR(fmt.Sprintf("%s %s %d %s %s", rc.NameFQDN, rc.Type, rc.SvcPriority, rc.target, rc.SvcParams))
if err != nil {

View File

@ -1,5 +1,6 @@
package models
// MakeUnknown turns an RecordConfig into an UNKNOWN type.
func MakeUnknown(rc *RecordConfig, rtype string, contents string, origin string) error {
rc.Type = "UNKNOWN"
rc.UnknownTypeName = rtype