diff options
author | Julien Dessaux | 2021-11-17 10:13:06 +0100 |
---|---|---|
committer | Julien Dessaux | 2021-11-17 10:13:06 +0100 |
commit | c3263c03776401ad1263a9fb8f5a44a8ed44d61b (patch) | |
tree | 7dac91753cb4428ede2ba72fb09eca9ba6c2daab /pkg/client/state.go | |
parent | Updated dependencies (diff) | |
download | shell-game-launcher-c3263c03776401ad1263a9fb8f5a44a8ed44d61b.tar.gz shell-game-launcher-c3263c03776401ad1263a9fb8f5a44a8ed44d61b.tar.bz2 shell-game-launcher-c3263c03776401ad1263a9fb8f5a44a8ed44d61b.zip |
Refactored package structure
Diffstat (limited to 'pkg/client/state.go')
-rw-r--r-- | pkg/client/state.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/pkg/client/state.go b/pkg/client/state.go new file mode 100644 index 0000000..576721c --- /dev/null +++ b/pkg/client/state.go @@ -0,0 +1,23 @@ +package client + +import ( + "shell-game-launcher/pkg/config" +) + +type State struct { + config *config.Config + currentMenu string + login string +} + +func NewState(config *config.Config, login string) *State { + cs := State{ + config: config, + currentMenu: "anonymous", + login: login, + } + if login != "" { + cs.currentMenu = "logged_in" + } + return &cs +} |