diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-03-18 10:45:10 +0100 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-04-05 12:26:15 +0200 |
| commit | 343836597df3efd6f31a68e29ff82b6ec4979f69 (patch) | |
| tree | fa00080e0379859a9b4b770bbd36743f56731d61 /cli | |
| parent | 42488834f8f60627830732428017cdf26733f12c (diff) | |
Move HTTP GET/POST methods to its own file
Diffstat (limited to 'cli')
| -rw-r--r-- | cli/main.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cli/main.go b/cli/main.go index c3b6258..42c4b67 100644 --- a/cli/main.go +++ b/cli/main.go @@ -14,6 +14,10 @@ func openBrowser(urlString string) { exec.Command("xdg-open", urlString).Start() } +func logState(oldState string, newState string) { + log.Printf("State: %s -> State: %s\n", oldState, newState) +} + func main() { urlArg := flag.String("url", "", "The url of the vpn") flag.Parse() @@ -30,7 +34,7 @@ func main() { state := eduvpn.GetVPNState() - eduvpn.Register(state, "org.eduvpn.app.linux", urlString) + eduvpn.Register(state, "org.eduvpn.app.linux", urlString, logState) authURL, err := eduvpn.InitializeOAuth(state) if err != nil { log.Fatal(err) |
