func GetDiff(current, desired []int) *Diff {
	diff := Diff{}

	cm := make(map[int]struct{})
	dm := make(map[int]struct{})

	for _, k := range current {
		cm[k] = struct{}{}
	}

	for _, k := range desired {
		dm[k] = struct{}{}
	}

	for k := range dm {
		if _, ok := cm[k]; !ok {
			diff.Add = append(diff.Add, k)
		}
	}

	for k := range cm {
		if _, ok := dm[k]; !ok {
			diff.Delete = append(diff.Delete, k)
		}
	}

	return &diff
}
// TODO: move outside, since it just compares ints and has nothing to do
// with the taghier
move outside, since it just compares ints and has nothing to do
with the taghier
// TODO : move outside since it just compares ints and has nothing to do // with the taghier
func GetDiff(current, desired []int) *Diff {
	diff := Diff{}
	cm := make(map[int]struct{})
	dm := make(map[int]struct{})
	for _, k := range current {
		cm[k] = struct{}{}
	}
	for _, k := range desired {
		dm[k] = struct{}{}
	}
	for k := range dm {
		if _, ok := cm[k]; !ok {
			diff.Add = append(diff.Add, k)
		}
	}
	for k := range cm {
		if _, ok := dm[k]; !ok {
			diff.Delete = append(diff.Delete, k)
		}
	}
	return &diff
}
func GetDiff ( current , desired [ ] int ) * Diff { diff := Diff { } cm := make ( map [ int ] struct { } ) dm := make ( map [ int ] struct { } ) for _ , k := range current { cm [ k ] = struct { } { } } for _ , k := range desired { dm [ k ] = struct { } { } } for k := range dm { if _ , ok := cm [ k ] ; ! ok { diff . Add = append ( diff . Add , k ) } } for k := range cm { if _ , ok := dm [ k ] ; ! ok { diff . Delete = append ( diff . Delete , k ) } } return & diff }
move outside, since it just compares ints and has nothing to do
with the taghier
move outside since it just compares ints and has nothing to do with the taghier