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 /internal | |
| parent | 7aca778d6433373b5c65d4172b28a4461239e3f8 (diff) | |
Format: Run gofumpt
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/log/log.go | 3 | ||||
| -rw-r--r-- | internal/oauth/oauth.go | 1 | ||||
| -rw-r--r-- | internal/server/secureinternet.go | 3 | ||||
| -rw-r--r-- | internal/server/servers.go | 3 | ||||
| -rw-r--r-- | internal/wireguard/wireguard.go | 1 |
5 files changed, 5 insertions, 6 deletions
diff --git a/internal/log/log.go b/internal/log/log.go index 68313f7..101c112 100644 --- a/internal/log/log.go +++ b/internal/log/log.go @@ -3,12 +3,13 @@ package log import ( "fmt" - "github.com/eduvpn/eduvpn-common/internal/oauth" "io" "log" "os" "path" + "github.com/eduvpn/eduvpn-common/internal/oauth" + "github.com/eduvpn/eduvpn-common/internal/util" "github.com/go-errors/errors" ) diff --git a/internal/oauth/oauth.go b/internal/oauth/oauth.go index 67d9c8a..1dbdad4 100644 --- a/internal/oauth/oauth.go +++ b/internal/oauth/oauth.go @@ -454,7 +454,6 @@ func (oauth *OAuth) AuthURL(name string, postProcessAuth func(string) string) (s } u, err := httpw.ConstructURL(oauth.BaseAuthorizationURL, params) - if err != nil { return "", errors.WrapPrefix(err, "httpw.ConstructURL error", 0) } diff --git a/internal/server/secureinternet.go b/internal/server/secureinternet.go index 12263a6..bd2d66a 100644 --- a/internal/server/secureinternet.go +++ b/internal/server/secureinternet.go @@ -108,7 +108,8 @@ func (s *SecureInternetHomeServer) addLocation(locSrv *types.DiscoveryServer) (* // Initializes the home server and adds its own location. func (s *SecureInternetHomeServer) init( - homeOrg *types.DiscoveryOrganization, homeLoc *types.DiscoveryServer) error { + homeOrg *types.DiscoveryOrganization, homeLoc *types.DiscoveryServer, +) error { if s.HomeOrganizationID != homeOrg.OrgID { // New home organisation, clear everything *s = SecureInternetHomeServer{} diff --git a/internal/server/servers.go b/internal/server/servers.go index 5ede005..8da1c7f 100644 --- a/internal/server/servers.go +++ b/internal/server/servers.go @@ -20,7 +20,6 @@ func (ss *Servers) AddSecureInternet( // If we have specified an organization ID // We also need to get an authorization template err := ss.SecureInternetHomeServer.init(secureOrg, secureServer) - if err != nil { return nil, err } @@ -30,7 +29,7 @@ func (ss *Servers) AddSecureInternet( } func (ss *Servers) GetCurrentServer() (Server, error) { - //TODO(jwijenbergh): Almost certainly the return type should be pointer (*Server) + // TODO(jwijenbergh): Almost certainly the return type should be pointer (*Server) if ss.IsType == SecureInternetServerType { if !ss.HasSecureLocation() { return nil, errors.Errorf("ss.IsType = %v; ss.HasSecureLocation() = false", ss.IsType) diff --git a/internal/wireguard/wireguard.go b/internal/wireguard/wireguard.go index 0419ff6..cc6c577 100644 --- a/internal/wireguard/wireguard.go +++ b/internal/wireguard/wireguard.go @@ -13,7 +13,6 @@ import ( // It returns an error if key generation failed. func GenerateKey() (wgtypes.Key, error) { key, err := wgtypes.GeneratePrivateKey() - if err != nil { return key, errors.WrapPrefix(err, "failed generating WireGuard key", 0) } |
