package metadata import ( "fmt" "runtime/debug" "strings" ) var ( GoTomatoVersion = "" // The GoTomato version ProtocolVersion = "" // The protocol version ) func init() { info, ok := debug.ReadBuildInfo() fmt.Printf("%v", info) if !ok { GoTomatoVersion = "unknown" } GoTomatoVersion = info.Main.Version ProtocolVersion = strings.Split(GoTomatoVersion, ".")[0] }