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:
Justin Santa Barbara
2017-01-16 10:16:24 -05:00
parent 8fa23586cf
commit 5d740dce6a
4 changed files with 15 additions and 1 deletions

View File

@@ -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
}