refactoring
This commit is contained in:
parent
1e478ffb3b
commit
0585c60063
@ -6,12 +6,6 @@ import (
|
|||||||
"sirlab.de/go/knyt/user"
|
"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) {
|
func NewApplication(config applicationConfig.ApplicationConfig) (*Application, error) {
|
||||||
app := Application{
|
app := Application{
|
||||||
config: config,
|
config: config,
|
||||||
@ -28,7 +22,3 @@ func NewApplication(config applicationConfig.ApplicationConfig) (*Application, e
|
|||||||
|
|
||||||
return &app, nil
|
return &app, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (app *Application) GetConfig() applicationConfig.ApplicationConfig {
|
|
||||||
return app.config
|
|
||||||
}
|
|
||||||
|
9
server/src/application/getConfig.go
Normal file
9
server/src/application/getConfig.go
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
package application
|
||||||
|
|
||||||
|
import (
|
||||||
|
"sirlab.de/go/knyt/applicationConfig"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (app *Application) GetConfig() applicationConfig.ApplicationConfig {
|
||||||
|
return app.config
|
||||||
|
}
|
13
server/src/application/struct.go
Normal file
13
server/src/application/struct.go
Normal file
@ -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
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user