File: set_released.go

package info (click to toggle)
golang-github-apparentlymart-go-versions 1.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 292 kB
  • sloc: makefile: 2
file content (30 lines) | stat: -rw-r--r-- 685 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package versions

type setReleased struct{}

func (s setReleased) Has(v Version) bool {
	return v.Prerelease == ""
}

func (s setReleased) AllRequested() Set {
	// The set of all released versions requests nothing.
	return None
}

func (s setReleased) GoString() string {
	return "versions.Released"
}

// Released is a set containing all versions that have an empty prerelease
// string.
var Released Set

// Prerelease is a set containing all versions that have a prerelease marker.
// This is the complement of Released, or in other words it is
// All.Subtract(Released).
var Prerelease Set

func init() {
	Released = Set{setI: setReleased{}}
	Prerelease = All.Subtract(Released)
}