1
0
mirror of https://github.com/rancher/norman.git synced 2025-07-12 23:00:47 +00:00

Add changed method

This commit is contained in:
Darren Shepherd 2018-08-13 09:59:10 -07:00
parent 5e344d90cd
commit 04c7130e5f

View File

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