MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / checkVersion

Function checkVersion

agent/utils/version/version.go:146–162  ·  view source on GitHub ↗
(v2, v1 string)

Source from the content-addressed store, hash-verified

144}
145
146func checkVersion(v2, v1 string) string {
147 addSuffix := false
148 if !strings.Contains(v1, "-") {
149 v1 = v1 + "-lts"
150 }
151 if !strings.Contains(v2, "-") {
152 addSuffix = true
153 v2 = v2 + "-lts"
154 }
155 if common.ComparePanelVersion(v2, v1) {
156 if addSuffix {
157 return strings.TrimSuffix(v2, "-lts")
158 }
159 return v2
160 }
161 return ""
162}
163
164func loadReleaseNotes(path string) (string, error) {
165 _, releaseNotes, err := HandleRequest(path, http.MethodGet, constant.TimeOut20s)

Callers 1

loadVersionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected