Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitSoftErrorMode ¶
func InitSoftErrorMode()
func IsSoftErrorOn ¶
func IsSoftErrorOn() bool
func SetSoftErrorMode ¶
func SetSoftErrorMode(newValue bool)
func SortUpstreamAppVersions ¶ added in v1.9.22
SortUpstreamAppVersions compares 2 Rancher chart version strings for Descending sort. Returns true if vA should come before vB (higher version first).
Version format: <upstream_version>+up<chart_version> Examples:
- "109.0.1+up0.10.4-rc.1"
- "109.0.1+up0.10.1"
- "109.0.1"
Comparison logic:
- Split on "+up" delimiter into upstream and chart parts
- Compare upstream versions using semver (descending)
- If upstream equal, compare chart versions using semver (descending)
- Semver automatically handles prereleases (rc, alpha, beta) per spec
- Invalid semver versions pushed to end of sort order
Use with sort.Slice:
sort.Slice(versions, func(i, j int) bool {
return util.SortUpstreamAppVersions(versions[i], versions[j])
})
Types ¶
type SoftErrorMode ¶
type SoftErrorMode struct {
Enabled bool
}
SoftErrorMode allows for skipping certain non-fatal errors from breaking execution
Click to show internal directories.
Click to hide internal directories.