From 95fc73543cf44cac96cbf6069bdec9bdf5997540 Mon Sep 17 00:00:00 2001 From: Alexander Sheiko Date: Sat, 9 Apr 2022 20:41:51 +0300 Subject: [PATCH] Add stringInSlice function --- util.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/util.go b/util.go index f107f33..f1b062f 100644 --- a/util.go +++ b/util.go @@ -177,3 +177,12 @@ func parseProfile(user legacyUser) Profile { return profile } + +func stringInSlice(a string, list []string) bool { + for _, b := range list { + if b == a { + return true + } + } + return false +}