Version 1.6 requires libdns v1.0 or later. The libdns v1.0 release introduced typed record structs that replace the generic libdns.Record type. This is a fundamental change to the libdns API.
- Typed Records: Instead of using generic
libdns.Recordstructs, libdns v1.0 introduced typed record implementations likelibdns.Address,libdns.TXT,libdns.SRV, etc. - Parse() Method: The new
Recordinterface includes aParse()method that returns typed structs - RR() Method: All record types implement
RR()to get the underlying resource record data
See the libdns documentation for complete details on migrating to typed records.
Example of the new API:
// Old (libdns <1.0)
records := []libdns.Record{
{
Type: "A",
Name: "www",
Value: "1.2.3.4",
TTL: 300 * time.Second,
},
}
// New (libdns >=1.0)
records := []libdns.Record{
libdns.Address{
Name: "www",
Value: netip.MustParseAddr("1.2.3.4"),
TTL: 300 * time.Second,
},
}Two provider configuration fields have been renamed for clarity:
Old (pre-v1.6):
provider := &route53.Provider{
MaxWaitDur: 60, // Was treated as seconds (multiplied by time.Second internally)
}New (v1.6+):
provider := &route53.Provider{
Route53MaxWait: 60 * time.Second, // Use proper time.Duration
}Important: In versions before v1.6, MaxWaitDur was silently multiplied by time.Second in the provider's init function. This was non-idiomatic Go and has been fixed. You must now provide a proper time.Duration value (like 60 * time.Second or 2 * time.Minute), as is standard in Go.
Failure to multiply by time.Second will result in a 60-nanosecond timeout instead of 60 seconds!
Rationale: The new name clearly indicates this is a Route53-specific timeout for AWS internal propagation, not general DNS propagation.
Old (pre-v1.6):
provider := &route53.Provider{
WaitForPropagation: true,
}New (v1.6+):
provider := &route53.Provider{
WaitForRoute53Sync: true,
}Rationale: The new name clearly indicates this waits for Route53's internal synchronization, not worldwide DNS propagation (which can take hours depending on TTL values).
Two deprecated fields have been removed in v1.6:
AWSProfile→ UseProfileinsteadToken→ UseSessionTokeninstead
These fields were deprecated several versions ago and have identical functionality to their replacements.
// Old (removed in v1.6)
provider := &route53.Provider{
AWSProfile: "my-profile",
Token: "my-session-token",
}
// New (v1.6+)
provider := &route53.Provider{
Profile: "my-profile",
SessionToken: "my-session-token",
}JSON Configuration: If using JSON config, update field names: aws_profile → profile, token → session_token
- Update to libdns v1.0+ (see libdns documentation for typed records)
- Rename
MaxWaitDurtoRoute53MaxWaitin your code - Change from plain integer (e.g.,
60) to propertime.Duration(e.g.,60 * time.Second) - Rename
WaitForPropagationtoWaitForRoute53Syncin your code - Replace
AWSProfilewithProfile(if using) - Replace
TokenwithSessionToken(if using) - Update JSON/YAML configuration files with new field names
- Test your code thoroughly after migration