MCPcopy Create free account
hub / github.com/Melkeydev/govm / GetCurrentGoVersion

Function GetCurrentGoVersion

internal/utils/utils.go:184–195  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

182 return VersionsMsg(versions)
183}
184func GetCurrentGoVersion() string {
185 cmd := exec.Command("go", "version")
186 output, err := cmd.Output()
187 if err != nil {
188 return ""
189 }
190 parts := strings.Split(string(output), " ")
191 if len(parts) >= 3 {
192 return strings.TrimPrefix(parts[2], "go")
193 }
194 return ""
195}
196func DownloadAndInstall(version GoVersion) tea.Cmd {
197 return func() tea.Msg {
198 homeDir, err := os.UserHomeDir()

Callers 1

FetchGoVersionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected