add version and translate all pages

This commit is contained in:
m
2026-09-15 13:57:57 +02:00
parent 4659f3abc5
commit 339d55d92f
19 changed files with 205 additions and 70 deletions
+3 -3
View File
@@ -8,19 +8,19 @@ type Client interface {
GetClientVersion() int
}
func NewClient(clientVersion int) (error, Client) {
func NewClient(clientVersion int) (Client, error) {
isCompatible := ServerClientIsCompatibleWithClient(clientVersion)
if !isCompatible {
return fmt.Errorf("You client version %d is not compatible with the server verison %d", clientVersion, SERVER_VERSION), nil
return nil, fmt.Errorf("client version %d is not compatible with the server version %d", clientVersion, SERVER_VERSION)
}
client := ClientVerisonOne{
Version: clientVersion,
}
return nil, &client
return &client, nil
}