summaryrefslogtreecommitdiff
path: root/internal/server
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-11-28 14:30:55 +0100
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-11-28 14:30:55 +0100
commitbb760ad9036b586fd4f07b96623e8421e1dccaf0 (patch)
treec06fa76d5fe89dadb3e7ad6d4f2c1d5fe6f94912 /internal/server
parent0bfb35520d7e138e6219e550187e0b55bc8a29ac (diff)
Formatting: Run golines
Diffstat (limited to 'internal/server')
-rw-r--r--internal/server/common.go16
-rw-r--r--internal/server/custom.go5
-rw-r--r--internal/server/instituteaccess.go5
3 files changed, 21 insertions, 5 deletions
diff --git a/internal/server/common.go b/internal/server/common.go
index e8eedd0..3db535c 100644
--- a/internal/server/common.go
+++ b/internal/server/common.go
@@ -340,7 +340,10 @@ func (base *Base) ValidProfiles(clientSupportsWireguard bool) ProfileInfo {
}
validProfiles = append(validProfiles, profile)
}
- return ProfileInfo{Current: base.Profiles.Current, Info: ProfileListInfo{ProfileList: validProfiles}}
+ return ProfileInfo{
+ Current: base.Profiles.Current,
+ Info: ProfileListInfo{ProfileList: validProfiles},
+ }
}
func ValidProfiles(server Server, clientSupportsWireguard bool) (*ProfileInfo, error) {
@@ -352,12 +355,19 @@ func ValidProfiles(server Server, clientSupportsWireguard bool) (*ProfileInfo, e
}
profiles := base.ValidProfiles(clientSupportsWireguard)
if len(profiles.Info.ProfileList) == 0 {
- return nil, types.NewWrappedError(errorMessage, errors.New("no profiles found with supported protocols"))
+ return nil, types.NewWrappedError(
+ errorMessage,
+ errors.New("no profiles found with supported protocols"),
+ )
}
return &profiles, nil
}
-func wireguardGetConfig(server Server, preferTCP bool, supportsOpenVPN bool) (string, string, error) {
+func wireguardGetConfig(
+ server Server,
+ preferTCP bool,
+ supportsOpenVPN bool,
+) (string, string, error) {
errorMessage := "failed getting server WireGuard configuration"
base, baseErr := server.Base()
diff --git a/internal/server/custom.go b/internal/server/custom.go
index f8899b3..d376727 100644
--- a/internal/server/custom.go
+++ b/internal/server/custom.go
@@ -31,7 +31,10 @@ func (servers *Servers) GetCustomServer(url string) (*InstituteAccessServer, err
if server, ok := servers.CustomServers.Map[url]; ok {
return server, nil
}
- return nil, types.NewWrappedError("failed to get institute access server", fmt.Errorf("no custom server with URL: %s", url))
+ return nil, types.NewWrappedError(
+ "failed to get institute access server",
+ fmt.Errorf("no custom server with URL: %s", url),
+ )
}
func (servers *Servers) RemoveCustomServer(url string) {
diff --git a/internal/server/instituteaccess.go b/internal/server/instituteaccess.go
index f76323c..9b6f735 100644
--- a/internal/server/instituteaccess.go
+++ b/internal/server/instituteaccess.go
@@ -46,7 +46,10 @@ func (servers *Servers) GetInstituteAccess(url string) (*InstituteAccessServer,
if server, ok := servers.InstituteServers.Map[url]; ok {
return server, nil
}
- return nil, types.NewWrappedError("failed to get institute access server", fmt.Errorf("no institute access server with URL: %s", url))
+ return nil, types.NewWrappedError(
+ "failed to get institute access server",
+ fmt.Errorf("no institute access server with URL: %s", url),
+ )
}
func (servers *Servers) RemoveInstituteAccess(url string) {