mirror of
https://git.uploadfilter24.eu/lerentis/terraform-provider-gitea.git
synced 2024-11-17 23:38:12 +00:00
b4859cda6b
Bumps [github.com/hashicorp/terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs) from 0.7.0 to 0.13.0. - [Release notes](https://github.com/hashicorp/terraform-plugin-docs/releases) - [Changelog](https://github.com/hashicorp/terraform-plugin-docs/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/terraform-plugin-docs/compare/v0.7.0...v0.13.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/terraform-plugin-docs dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
24 lines
729 B
Go
24 lines
729 B
Go
package semver
|
|
|
|
// Collection is a collection of Version instances and implements the sort
|
|
// interface. See the sort package for more details.
|
|
// https://golang.org/pkg/sort/
|
|
type Collection []*Version
|
|
|
|
// Len returns the length of a collection. The number of Version instances
|
|
// on the slice.
|
|
func (c Collection) Len() int {
|
|
return len(c)
|
|
}
|
|
|
|
// Less is needed for the sort interface to compare two Version objects on the
|
|
// slice. If checks if one is less than the other.
|
|
func (c Collection) Less(i, j int) bool {
|
|
return c[i].LessThan(c[j])
|
|
}
|
|
|
|
// Swap is needed for the sort interface to replace the Version objects
|
|
// at two different positions in the slice.
|
|
func (c Collection) Swap(i, j int) {
|
|
c[i], c[j] = c[j], c[i]
|
|
}
|