From 347b20fc91505584bc9efbeca89590a411b95e79 Mon Sep 17 00:00:00 2001 From: Jeroen Wijenbergh Date: Tue, 6 May 2025 12:40:47 +0200 Subject: All: Run modernize --test --fix --- client/id.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'client/id.go') 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 { -- cgit v1.2.3