diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-04-26 16:31:45 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-04-26 16:31:45 +0200 |
| commit | 39f0e8e26ab37c4b83c1933ba90bae15cd7e04fc (patch) | |
| tree | a1d496c73fa5d2793105151835cb7e06b82c17b8 /state.go | |
| parent | 5608d9a858c2323002305ea1fedb5793a40edc58 (diff) | |
State: Add a state map to exports instead of a global singleton
Diffstat (limited to 'state.go')
| -rw-r--r-- | state.go | 9 |
1 files changed, 0 insertions, 9 deletions
@@ -25,15 +25,6 @@ type VPNState struct { Debug bool `json:"-"` } -var VPNStateInstance *VPNState - -func GetVPNState() *VPNState { - if VPNStateInstance == nil { - VPNStateInstance = &VPNState{} - } - return VPNStateInstance -} - func (state *VPNState) Register(name string, directory string, stateCallback func(string, string, string), debug bool) error { if !state.FSM.InState(internal.DEREGISTERED) { return errors.New("app already registered") |
