dnsprovider: Add IsEmpty method
When batching changes, it is often handy to know whether a changeset IsEmpty, and thus does not need to be Apply-ed.
This commit is contained in:
@@ -72,3 +72,7 @@ func (c *ResourceRecordChangeset) Apply() error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *ResourceRecordChangeset) IsEmpty() bool {
|
||||
return len(c.additions) == 0 && len(c.removals) == 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user