Documentation
¶
Overview ¶
Package pkgrel says whether two readings of a software's release are the same release written with more or less detail: a scan banner's "10.2", an upstream "10.2p1", Alpine's "10.2_p1-r1", Debian's "1:10.2p1-2ubuntu3.8", RPM's "8.7p1-38.el9". A pure function on text a device, a person or a scan sent; a text of another shape is compared as written, never guessed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Same ¶
Same reports whether two readings are one release: each reading is its package release when it has one, else its version. "10.2" and "10.2p1" are the same (the shorter one omits the patch level); 10.2 and 9.8, or 10.2 and 10.3, are not. An empty reading is never the same as anything.
func Upstream ¶
Upstream is the upstream version a release text names, lower case: a banner's extra words are dropped ("10.2p1 Ubuntu 2ubuntu3.8" is 10.2p1), an apk release reads as NVD writes it ("10.2_p1-r1" is 10.2p1), and a Debian or RPM release loses its epoch and its distribution revision ("1:9.2p1-2+deb12u3" is 9.2p1, "8.7p1-38.el9" is 8.7p1).
Types ¶
This section is empty.