summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/client.go6
-rw-r--r--client/client_test.go4
-rw-r--r--client/fsm.go28
-rw-r--r--client/server.go4
4 files changed, 21 insertions, 21 deletions
diff --git a/client/client.go b/client/client.go
index 958dd25..3f8dbea 100644
--- a/client/client.go
+++ b/client/client.go
@@ -15,11 +15,11 @@ import (
type (
// ServerBase is an alias to the internal ServerBase
- // This contains the details for each server
+ // This contains the details for each server.
ServerBase = server.ServerBase
)
-// This wraps the error, logs it and then returns the wrapped error
+// This wraps the error, logs it and then returns the wrapped error.
func (client *Client) handleError(message string, err error) error {
if err != nil {
// Logs the error with the same level/verbosity as the error
@@ -34,7 +34,7 @@ func (client Client) isLetsConnect() bool {
return strings.HasPrefix(client.Name, "org.letsconnect-vpn.app")
}
-// Client is the main struct for the VPN client
+// Client is the main struct for the VPN client.
type Client struct {
// The name of the client
Name string `json:"-"`
diff --git a/client/client_test.go b/client/client_test.go
index a125e7e..128319c 100644
--- a/client/client_test.go
+++ b/client/client_test.go
@@ -331,7 +331,7 @@ func TestTokenInvalid(t *testing.T) {
}
}
-// Test if an invalid profile will be corrected
+// Test if an invalid profile will be corrected.
func TestInvalidProfileCorrected(t *testing.T) {
serverURI := getServerURI(t)
state := &Client{}
@@ -389,7 +389,7 @@ func TestInvalidProfileCorrected(t *testing.T) {
}
}
-// Test if prefer tcp is handled correctly by checking the returned config and config type
+// Test if prefer tcp is handled correctly by checking the returned config and config type.
func TestPreferTCP(t *testing.T) {
serverURI := getServerURI(t)
state := &Client{}
diff --git a/client/fsm.go b/client/fsm.go
index f4bfe21..2245630 100644
--- a/client/fsm.go
+++ b/client/fsm.go
@@ -17,46 +17,46 @@ type (
)
const (
- // StateDeregistered means the app is not registered with the wrapper
+ // StateDeregistered means the app is not registered with the wrapper.
StateDeregistered FSMStateID = iota
- // StateNoServer means the user has not chosen a server yet
+ // StateNoServer means the user has not chosen a server yet.
StateNoServer
- // StateAskLocation means the user selected a Secure Internet server but needs to choose a location
+ // StateAskLocation means the user selected a Secure Internet server but needs to choose a location.
StateAskLocation
- // StateSearchServer means the user is currently selecting a server in the UI
+ // StateSearchServer means the user is currently selecting a server in the UI.
StateSearchServer
- // StateLoadingServer means we are loading the server details
+ // StateLoadingServer means we are loading the server details.
StateLoadingServer
- // StateChosenServer means the user has chosen a server to connect to
+ // StateChosenServer means the user has chosen a server to connect to.
StateChosenServer
- // StateOAuthStarted means the OAuth process has started
+ // StateOAuthStarted means the OAuth process has started.
StateOAuthStarted
- // StateAuthorized means the OAuth process has finished and the user is now authorized with the server
+ // StateAuthorized means the OAuth process has finished and the user is now authorized with the server.
StateAuthorized
- // StateRequestConfig means the user has requested a config for connecting
+ // StateRequestConfig means the user has requested a config for connecting.
StateRequestConfig
- // StateAskProfile means the go code is asking for a profile selection from the UI
+ // StateAskProfile means the go code is asking for a profile selection from the UI.
StateAskProfile
- // StateDisconnected means the user has gotten a config for a server but is not connected yet
+ // StateDisconnected means the user has gotten a config for a server but is not connected yet.
StateDisconnected
- // StateDisconnecting means the OS is disconnecting and the Go code is doing the /disconnect
+ // StateDisconnecting means the OS is disconnecting and the Go code is doing the /disconnect.
StateDisconnecting
- // StateConnecting means the OS is establishing a connection to the server
+ // StateConnecting means the OS is establishing a connection to the server.
StateConnecting
- // StateConnected means the user has been connected to the server
+ // StateConnected means the user has been connected to the server.
StateConnected
)
diff --git a/client/server.go b/client/server.go
index 5fed292..5331a7d 100644
--- a/client/server.go
+++ b/client/server.go
@@ -315,7 +315,7 @@ func (client *Client) AddSecureInternetHomeServer(orgID string) (server.Server,
return server, nil
}
-// AddCustomServer adds a Custom Server by `url`
+// AddCustomServer adds a Custom Server by `url`.
func (client *Client) AddCustomServer(url string) (server.Server, error) {
errorMessage := fmt.Sprintf("failed adding Custom server with url %s", url)
@@ -501,7 +501,7 @@ func (client *Client) askSecureLocation() error {
// ChangeSecureLocation changes the location for an existing Secure Internet Server.
// Changing a secure internet location is only possible when the user is in the main screen (STATE_NO_SERVER), otherwise it returns an error.
-// It also returns an error if something has gone wrong when selecting the new location
+// It also returns an error if something has gone wrong when selecting the new location.
func (client *Client) ChangeSecureLocation() error {
errorMessage := "failed to change location from the main screen"