diff options
author | kali kaneko (leap communications) <kali@leap.se> | 2021-02-08 20:34:42 +0100 |
---|---|---|
committer | kali kaneko (leap communications) <kali@leap.se> | 2021-02-08 23:32:22 +0100 |
commit | 7af4d63ea872609a9d7c2f9d954a211bded1b5bb (patch) | |
tree | 549723cd55aa1a90813a08a6e0435829daa4378a /pkg | |
parent | 69f1304f51371b246da6ecf1abc8c6703fbfebf9 (diff) |
[style] cleanup
- remove unused debug
- uncomment notification function, leftover from debug
- comment about go-land mutexes
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/backend/status.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/pkg/backend/status.go b/pkg/backend/status.go index f793e2f..16db227 100644 --- a/pkg/backend/status.go +++ b/pkg/backend/status.go @@ -5,7 +5,6 @@ import ( "encoding/json" "log" "sync" - "fmt" // DEBUG "0xacab.org/leap/bitmask-vpn/pkg/bitmask" "0xacab.org/leap/bitmask-vpn/pkg/config" @@ -19,13 +18,14 @@ const ( failedStr = "failed" ) -var statusMutex sync.Mutex -var updateMutex sync.Mutex - // ctx will be our glorious global object. // if we ever switch again to a provider-agnostic app, we should keep a map here. var ctx *connectionCtx +// these mutexes protect setting and updating the global status in this go backend +var statusMutex sync.Mutex +var updateMutex sync.Mutex + // The connectionCtx keeps the global state that is passed around to C-land. It // also serves as the primary way of passing requests from the frontend to the // Go-core, by letting the UI write some of these variables and processing @@ -57,7 +57,6 @@ func (c connectionCtx) toJson() ([]byte, error) { log.Println(err) return nil, err } - fmt.Println(">>> ctx toJson done") return b, nil } |