diff options
| author | Jeroen Wijenbergh <jeroen.wijenbergh@geant.org> | 2025-05-06 12:40:47 +0200 |
|---|---|---|
| committer | Jeroen Wijenbergh <jeroen.wijenbergh@geant.org> | 2025-05-06 12:40:47 +0200 |
| commit | 347b20fc91505584bc9efbeca89590a411b95e79 (patch) | |
| tree | 9dfc600e957c4a881115f8bc8a9cc107a4f0cc9c /client/id.go | |
| parent | 9c4985368aee638d982f30ea7bc5c7ee71ae3ab3 (diff) | |
All: Run modernize --test --fix
Diffstat (limited to 'client/id.go')
| -rw-r--r-- | client/id.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/client/id.go b/client/id.go index b4e1670..165e2a0 100644 --- a/client/id.go +++ b/client/id.go @@ -1,5 +1,7 @@ package client +import "slices" + // isAllowedClientID checks if the 'clientID' is in the list of allowed client IDs func isAllowedClientID(clientID string) bool { allowList := []string{ @@ -22,12 +24,7 @@ func isAllowedClientID(clientID string) bool { "org.govvpn.app.macos", "org.govvpn.app.linux", } - for _, x := range allowList { - if x == clientID { - return true - } - } - return false + return slices.Contains(allowList, clientID) } func userAgentName(clientID string) string { |
