GoTomato/internal/metadata/version.go
Sebastian Mark e9d8d2e2dd feat: move version string to version.txt
- create version.txt to store the version number
- add function to read version from version.txt
- replace hardcoded version with dynamic retrieval
2024-11-08 17:30:25 +01:00

16 lines
353 B
Go

package metadata
import (
"os"
"strings"
)
func getVersion() string {
content, _ := os.ReadFile("version.txt")
version := strings.TrimSpace(string(content))
return version
}
var GoTomatoVersion = getVersion() // The GoTomato version
var ProtocolVersion = strings.Split(GoTomatoVersion, ".")[0] // The protocol version