Implement downloading releases

This commit is contained in:
2025-01-11 15:26:05 +01:00
parent 863098f3ce
commit e36f46bd8c
2 changed files with 55 additions and 43 deletions

View File

@@ -1 +1,17 @@
package main
package main
import (
"fmt"
"strings"
)
func GetVersion(data string) (version string, err error) {
lines := strings.Split(data, "\n")
for _, line := range lines {
version = versionRegex.FindString(line)
if version != "" {
return version, nil
}
}
return "", fmt.Errorf("no version found")
}