From 39f0e8e26ab37c4b83c1933ba90bae15cd7e04fc Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Tue, 26 Apr 2022 16:31:45 +0200 Subject: State: Add a state map to exports instead of a global singleton --- state.go | 9 --------- 1 file changed, 9 deletions(-) (limited to 'state.go') diff --git a/state.go b/state.go index 1f9f52c..3ca0a4b 100644 --- a/state.go +++ b/state.go @@ -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") -- cgit v1.2.3