Skip to content

Commit

Permalink
Add changed method
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuildthecloud committed Aug 13, 2018
1 parent 5e344d9 commit 04c7130
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions types/set/reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@ func Diff(desired, actual map[string]bool) (toCreate []string, toDelete []string
}
return
}

func Changed(desired, actual map[string]bool) bool {
toCreate, toDelete, _ := Diff(desired, actual)
return len(toCreate) != 0 || len(toDelete) != 0
}

0 comments on commit 04c7130

Please sign in to comment.