summaryrefslogtreecommitdiff
path: root/pkg/utils/main.go
diff options
context:
space:
mode:
authorGrailFinder <wohilas@gmail.com>2024-04-20 07:45:00 +0300
committerGrailFinder <wohilas@gmail.com>2024-04-20 07:45:00 +0300
commitb33be53ea9c0be523988a9412fd8e3f6a24782b3 (patch)
tree2f05cbfc78613f1771eb8143105859983cb91750 /pkg/utils/main.go
parentac70f43c3e52e35195353c73af5687b8286ff581 (diff)
Feat: add auth [wip]
Diffstat (limited to 'pkg/utils/main.go')
-rw-r--r--pkg/utils/main.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/pkg/utils/main.go b/pkg/utils/main.go
new file mode 100644
index 0000000..f49313e
--- /dev/null
+++ b/pkg/utils/main.go
@@ -0,0 +1,24 @@
+package utils
+
+import (
+ "strings"
+ "unicode"
+)
+
+func RemoveSpacesFromStr(origin string) string {
+ return strings.Map(func(r rune) rune {
+ if unicode.IsSpace(r) {
+ return -1
+ }
+ return r
+ }, origin)
+}
+
+func StrInSlice(key string, sl []string) bool {
+ for _, i := range sl {
+ if key == i {
+ return true
+ }
+ }
+ return false
+}