diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-12-12 13:30:18 +0100 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-12-12 13:39:21 +0100 |
| commit | 3263a6fb3719148358ce11b3c744508451d6e1a6 (patch) | |
| tree | d9661922d9522eff4051db816036cda88aefe6ac /client | |
| parent | 7aca778d6433373b5c65d4172b28a4461239e3f8 (diff) | |
Format: Run gofumpt
Diffstat (limited to 'client')
| -rw-r--r-- | client/fsm.go | 4 | ||||
| -rw-r--r-- | client/server.go | 20 |
2 files changed, 12 insertions, 12 deletions
diff --git a/client/fsm.go b/client/fsm.go index 76dee05..c156fba 100644 --- a/client/fsm.go +++ b/client/fsm.go @@ -212,7 +212,7 @@ func (c *Client) SetSearchServer() error { return err } - //TODO(jwijenbergh): Should we handle `false` returned value here? + // TODO(jwijenbergh): Should we handle `false` returned value here? c.FSM.GoTransition(StateSearchServer) return nil } @@ -325,7 +325,7 @@ func (c *Client) SetDisconnected(cleanup bool) error { func (c *Client) goBackInternal() { err := c.GoBack() if err != nil { - //TODO(jwijenbergh): Bit suspicious - logging level INFO, yet stacktrace logged. + // TODO(jwijenbergh): Bit suspicious - logging level INFO, yet stacktrace logged. c.Logger.Infof("failed going back: %s\nstacktrace:\n%s", err.Error(), err.(*errors.Error).ErrorStack()) } } diff --git a/client/server.go b/client/server.go index 7d620c6..3488b6b 100644 --- a/client/server.go +++ b/client/server.go @@ -16,7 +16,7 @@ func (c *Client) getConfigAuth(srv server.Server, preferTCP bool) (string, strin return "", "", err } - //TODO(jwijenbergh): Should we check if it returns false? + // TODO(jwijenbergh): Should we check if it returns false? c.FSM.GoTransition(StateRequestConfig) ok, err := server.HasValidProfile(srv, c.SupportsWireguard) @@ -83,8 +83,8 @@ func (c *Client) getConfig(srv server.Server, preferTCP bool) (string, string, e // Save the config if err = c.Config.Save(&c); err != nil { - //TODO(jwijenbergh): Not sure why INFO level, yet stacktrace... - //TODO(jwijenbergh): Even worse, why logging it but then return nil? The calling code will think that everything went well. + // TODO(jwijenbergh): Not sure why INFO level, yet stacktrace... + // TODO(jwijenbergh): Even worse, why logging it but then return nil? The calling code will think that everything went well. c.Logger.Infof("c.Config.Save failed: %s\nstacktrace:\n%s", err.Error(), err.(*errors.Error).ErrorStack()) } @@ -130,8 +130,8 @@ func (c *Client) RemoveSecureInternet() error { c.FSM.GoTransitionWithData(StateNoServer, c.Servers) // Save the config if err := c.Config.Save(&c); err != nil { - //TODO(jwijenbergh): Not sure why INFO level, yet stacktrace... - //TODO(jwijenbergh): Even worse, why logging it but then return nil? The calling code will think that everything went well. + // TODO(jwijenbergh): Not sure why INFO level, yet stacktrace... + // TODO(jwijenbergh): Even worse, why logging it but then return nil? The calling code will think that everything went well. c.Logger.Infof("c.Config.Save failed: %s\nstacktrace:\n%s", err.Error(), err.(*errors.Error).ErrorStack()) } @@ -152,8 +152,8 @@ func (c *Client) RemoveInstituteAccess(url string) error { c.FSM.GoTransitionWithData(StateNoServer, c.Servers) // Save the config if err := c.Config.Save(&c); err != nil { - //TODO(jwijenbergh): Not sure why INFO level, yet stacktrace... - //TODO(jwijenbergh): Even worse, why logging it but then return nil? The calling code will think that everything went well. + // TODO(jwijenbergh): Not sure why INFO level, yet stacktrace... + // TODO(jwijenbergh): Even worse, why logging it but then return nil? The calling code will think that everything went well. c.Logger.Infof("c.Config.Save failed: %s\nstacktrace:\n%s", err.Error(), err.(*errors.Error).ErrorStack()) } @@ -174,8 +174,8 @@ func (c *Client) RemoveCustomServer(url string) error { c.FSM.GoTransitionWithData(StateNoServer, c.Servers) // Save the config if err := c.Config.Save(&c); err != nil { - //TODO(jwijenbergh): Not sure why INFO level, yet stacktrace... - //TODO(jwijenbergh): Even worse, why logging it but then return nil? The calling code will think that everything went well. + // TODO(jwijenbergh): Not sure why INFO level, yet stacktrace... + // TODO(jwijenbergh): Even worse, why logging it but then return nil? The calling code will think that everything went well. c.Logger.Infof("c.Config.Save failed: %s\nstacktrace:\n%s", err.Error(), err.(*errors.Error).ErrorStack()) } @@ -265,7 +265,7 @@ func (c *Client) AddSecureInternetHomeServer(orgID string) (srv server.Server, e return nil, err } - //TODO(jwijenbergh): Does this call transfers execution flow to UI? + // TODO(jwijenbergh): Does this call transfers execution flow to UI? if err = c.askSecureLocation(); err != nil { // Removing is the best effort // This already goes back to the main screen |
