MCPcopy
hub / github.com/DNSControl/dnscontrol / Copy

Method Copy

models/record.go:256–263  ·  view source on GitHub ↗

Copy returns a deep copy of a RecordConfig.

()

Source from the content-addressed store, hash-verified

254
255// Copy returns a deep copy of a RecordConfig.
256func (rc *RecordConfig) Copy() (*RecordConfig, error) {
257 newR := &RecordConfig{}
258 // Copy the exported fields.
259 err := reprint.FromTo(rc, newR) // Deep copy
260 // Set each unexported field.
261 newR.target = rc.target
262 return newR, err
263}
264
265// SetLabel sets the .Name/.NameFQDN fields given a short name and origin.
266// origin must not have a trailing dot: The entire code base maintains dc.Name

Callers 15

TestRecordConfig_CopyFunction · 0.95
updateZoneByMethod · 0.45
fetchZoneRecordsRealFunction · 0.45
verifyRegistrarCredsRealFunction · 0.45
renderCredsJSONFunction · 0.45
makeChangesFunction · 0.45
testgroupFunction · 0.45
TestDualProvidersFunction · 0.45
TestDuplicateNameserversFunction · 0.45
ensureCachedMethod · 0.45
CorrectZoneRecordsFunction · 0.45

Calls

no outgoing calls

Tested by 5

TestRecordConfig_CopyFunction · 0.76
makeChangesFunction · 0.36
testgroupFunction · 0.36
TestDualProvidersFunction · 0.36
TestDuplicateNameserversFunction · 0.36