From 0585c60063309c882a36b23a4df5e7f29d492b7c Mon Sep 17 00:00:00 2001 From: Settel Date: Mon, 9 Aug 2021 10:23:58 +0200 Subject: [PATCH] refactoring --- server/src/application/application.go | 10 ---------- server/src/application/getConfig.go | 9 +++++++++ server/src/application/struct.go | 13 +++++++++++++ 3 files changed, 22 insertions(+), 10 deletions(-) create mode 100644 server/src/application/getConfig.go create mode 100644 server/src/application/struct.go diff --git a/server/src/application/application.go b/server/src/application/application.go index 83d2840..b1e714b 100644 --- a/server/src/application/application.go +++ b/server/src/application/application.go @@ -6,12 +6,6 @@ import ( "sirlab.de/go/knyt/user" ) -type Application struct { - config applicationConfig.ApplicationConfig - users map[string]*user.User - games map[string]*game.Game -} - func NewApplication(config applicationConfig.ApplicationConfig) (*Application, error) { app := Application{ config: config, @@ -28,7 +22,3 @@ func NewApplication(config applicationConfig.ApplicationConfig) (*Application, e return &app, nil } - -func (app *Application) GetConfig() applicationConfig.ApplicationConfig { - return app.config -} diff --git a/server/src/application/getConfig.go b/server/src/application/getConfig.go new file mode 100644 index 0000000..6d114d4 --- /dev/null +++ b/server/src/application/getConfig.go @@ -0,0 +1,9 @@ +package application + +import ( + "sirlab.de/go/knyt/applicationConfig" +) + +func (app *Application) GetConfig() applicationConfig.ApplicationConfig { + return app.config +} diff --git a/server/src/application/struct.go b/server/src/application/struct.go new file mode 100644 index 0000000..913ec20 --- /dev/null +++ b/server/src/application/struct.go @@ -0,0 +1,13 @@ +package application + +import ( + "sirlab.de/go/knyt/applicationConfig" + "sirlab.de/go/knyt/game" + "sirlab.de/go/knyt/user" +) + +type Application struct { + config applicationConfig.ApplicationConfig + users map[string]*user.User + games map[string]*game.Game +}