From 376377d867e0143829c03289d6acbd171cc5e0e0 Mon Sep 17 00:00:00 2001 From: fanyx Date: Fri, 9 Apr 2021 01:32:13 +0200 Subject: [PATCH] small change --- pkg/config/config.go | 13 +++++++++---- pkg/gbxremote/gbxremote.go | 3 ++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index d875109..689dc34 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -42,9 +42,14 @@ func (c *AppConfig) ReadConfig() { } func LoadDefaults() AppConfig { - var c AppConfig - c.Trackmania.Host = "127.0.0.1" - c.Trackmania.Port = 5000 - c.Api.Port = 5111 + var c = AppConfig{ + Trackmania: TrackmaniaConfig{ + Host: "127.0.0.1", + Port: 5000, + }, + Api: ApiConfig{ + Port: 5111, + }, + } return c } diff --git a/pkg/gbxremote/gbxremote.go b/pkg/gbxremote/gbxremote.go index 8d0467b..a4d65a5 100644 --- a/pkg/gbxremote/gbxremote.go +++ b/pkg/gbxremote/gbxremote.go @@ -47,5 +47,6 @@ func (client *GbxClient) Connect(c config.AppConfig) { log.Fatal("Protocol not GBXRemote 2") } - log.Println("Connection established successfully!") + log.Println("Connection established!") + log.Println("Host:", c.Trackmania.Host, "- Port:", c.Trackmania.Port) }