mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-01-11 18:08:57 +08:00
DOCS: Clarify ByRecord() assertions (#1931)
This commit is contained in:
parent
839abd122e
commit
214eaeb84d
1 changed files with 6 additions and 0 deletions
|
@ -132,6 +132,12 @@ func ByLabel(existing models.Records, dc *models.DomainConfig, compFunc Comparab
|
|||
//
|
||||
// Use this with DNS providers whose API updates one record at a time.
|
||||
//
|
||||
// Note: The .Old and .New field are lists ([]models.RecordConfig) but
|
||||
// when using ByRecord() they will never have more than one entry.
|
||||
// A create always has exactly 1 new: .New[0]
|
||||
// A change always has exactly 1 old and 1 new: .Old[0] and .New[0]
|
||||
// A delete always has exactly 1 old: .Old[0]
|
||||
//
|
||||
// Examples include: INWX
|
||||
func ByRecord(existing models.Records, dc *models.DomainConfig, compFunc ComparableFunc) (ChangeList, error) {
|
||||
// dc stores the desired state.
|
||||
|
|
Loading…
Reference in a new issue