feat: update protocol version handling
- add ProtocolVersion variable to metadata package
- don't set `ServerMessage.ProtocolVersion` in `main`
- update `ServerMessage` default to include ProtocolVersion
🤖
This commit is contained in:
parent
f8ab1375d1
commit
f0d7dc80fc
3 changed files with 12 additions and 9 deletions
|
@ -10,7 +10,6 @@ import (
|
|||
"github.com/charmbracelet/log"
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func Start() {
|
||||
|
@ -21,10 +20,9 @@ func Start() {
|
|||
showVersionFlag := flag.Bool("version", false, "Output version")
|
||||
flag.Parse()
|
||||
|
||||
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.ProtocolVersion)
|
||||
fmt.Printf("Protocol-Version: %s\n", metadata.ProtocolVersion)
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue