Skip to content

Commit

Permalink
refactor: use SliceStable instead of Slice method
Browse files Browse the repository at this point in the history
  • Loading branch information
sundowndev committed Mar 22, 2021
1 parent edb5de3 commit eba0839
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/resource/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ func IsSameResource(rRs, lRs Resource) bool {
}

func Sort(res []Resource) []Resource {
sort.Slice(res, func(i, j int) bool { return res[i].TerraformId() < res[j].TerraformId() })
sort.SliceStable(res, func(i, j int) bool { return res[i].TerraformId() < res[j].TerraformId() })
return res
}

0 comments on commit eba0839

Please sign in to comment.