break: rename ServerMessage.GoTomatoVersion -> .ProtocolVersion

This commit is contained in:
Sebastian Mark 2024-10-26 09:18:09 +02:00
parent 16bc946a30
commit 0180aea8c1
2 changed files with 3 additions and 3 deletions

View file

@ -21,10 +21,10 @@ func Start() {
showVersionFlag := flag.Bool("version", false, "Output version") showVersionFlag := flag.Bool("version", false, "Output version")
flag.Parse() flag.Parse()
shared.Message.GoTomatoVersion = strings.Split(metadata.GoTomatoVersion, ".")[0] shared.Message.ProtocolVersion = strings.Split(metadata.GoTomatoVersion, ".")[0]
if *showVersionFlag { if *showVersionFlag {
fmt.Printf("App-Version: %s\n", metadata.GoTomatoVersion) fmt.Printf("App-Version: %s\n", metadata.GoTomatoVersion)
fmt.Printf("Protocol-Version: %s\n", shared.Message.GoTomatoVersion) fmt.Printf("Protocol-Version: %s\n", shared.Message.ProtocolVersion)
os.Exit(0) os.Exit(0)
} }

View file

@ -8,5 +8,5 @@ type ServerMessage struct {
TimeLeft int `json:"time_left"` // Remaining time in seconds TimeLeft int `json:"time_left"` // Remaining time in seconds
Ongoing bool `json:"ongoing"` // Ongoing pomodoro Ongoing bool `json:"ongoing"` // Ongoing pomodoro
Paused bool `json:"paused"` // Is timer paused Paused bool `json:"paused"` // Is timer paused
GoTomatoVersion string `json:"version"` // Version of the server ProtocolVersion string `json:"version"` // Version of the server
} }