Sebastian Mark
6b90c5e4a2
- create version.txt to store the version number - add function to read version from version.txt - replace hardcoded version with dynamic retrieval
16 lines
353 B
Go
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
|