hashicorp / hashicorp/terraform-plugin-testing
FR: utilize slices and maps Golang packages for testing helper functions
- Dominant language
- Go
- Stars
- 68
- Forks
- 22
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 1
Description
With the advent of the `slices` and `maps` packages promotion from experimental to core in Go 1.21, and generics in 1.17, we now have e.g. https://pkg.go.dev/slices#Equal. Could we have helper functions as part of the type https://pkg.go.dev/github.com/hashicorp/terraform-plugin-testing/helper/resource#TestCheckFunc that e.g. ascertain `list` and `set` equality instead of using the cumbersome https://pkg.go.dev/github.com/hashicorp/terraform-plugin-testing/helper/resource#example-TestCheckResourceAttr-TypeListAttribute?
There are for sure other examples, but I feel the above is demonstrative of what I am trying to communicate.
Contributor guide
Assessment
This issue has not been assessed yet.