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

Function getMajorVersion

agent/app/service/app_utils.go:2006–2012  ·  view source on GitHub ↗
(version string)

Source from the content-addressed store, hash-verified

2004}
2005
2006func getMajorVersion(version string) string {
2007 parts := strings.Split(version, ".")
2008 if len(parts) >= 2 {
2009 return parts[0] + "." + parts[1]
2010 }
2011 return version
2012}
2013
2014func ignoreUpdate(installed model.AppInstall) bool {
2015 if installed.App.Type == "php" || installed.Status == constant.StatusInstalling {

Callers 3

GetUpdateVersionsMethod · 0.85
handleInstalledFunction · 0.85
ignoreUpdateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected