summaryrefslogtreecommitdiff
path: root/client/id.go
diff options
context:
space:
mode:
authorJeroen Wijenbergh <jeroen.wijenbergh@geant.org>2025-05-06 12:40:47 +0200
committerJeroen Wijenbergh <jeroen.wijenbergh@geant.org>2025-05-06 12:40:47 +0200
commit347b20fc91505584bc9efbeca89590a411b95e79 (patch)
tree9dfc600e957c4a881115f8bc8a9cc107a4f0cc9c /client/id.go
parent9c4985368aee638d982f30ea7bc5c7ee71ae3ab3 (diff)
All: Run modernize --test --fix
Diffstat (limited to 'client/id.go')
-rw-r--r--client/id.go9
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 {