From 0180aea8c1b1d6a258e12bb2dd58593c6bf7f02a Mon Sep 17 00:00:00 2001 From: Sebastian Mark Date: Sat, 26 Oct 2024 09:18:09 +0200 Subject: [PATCH] break: rename `ServerMessage.GoTomatoVersion` -> `.ProtocolVersion` --- cmd/server/main.go | 4 ++-- pkg/models/server.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/server/main.go b/cmd/server/main.go index 46dc46f..f78b256 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -21,10 +21,10 @@ func Start() { showVersionFlag := flag.Bool("version", false, "Output version") flag.Parse() - shared.Message.GoTomatoVersion = strings.Split(metadata.GoTomatoVersion, ".")[0] + shared.Message.ProtocolVersion = strings.Split(metadata.GoTomatoVersion, ".")[0] if *showVersionFlag { 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) } diff --git a/pkg/models/server.go b/pkg/models/server.go index 674eeba..a432499 100644 --- a/pkg/models/server.go +++ b/pkg/models/server.go @@ -8,5 +8,5 @@ type ServerMessage struct { TimeLeft int `json:"time_left"` // Remaining time in seconds Ongoing bool `json:"ongoing"` // Ongoing pomodoro Paused bool `json:"paused"` // Is timer paused - GoTomatoVersion string `json:"version"` // Version of the server + ProtocolVersion string `json:"version"` // Version of the server }