diff options
author | GrailFinder <wohilas@gmail.com> | 2024-04-20 07:45:00 +0300 |
---|---|---|
committer | GrailFinder <wohilas@gmail.com> | 2024-04-20 07:45:00 +0300 |
commit | b33be53ea9c0be523988a9412fd8e3f6a24782b3 (patch) | |
tree | 2f05cbfc78613f1771eb8143105859983cb91750 /pkg | |
parent | ac70f43c3e52e35195353c73af5687b8286ff581 (diff) |
Feat: add auth [wip]
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/utils/main.go | 24 |
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 +} |