mirror of
https://github.com/paralus/paralus.git
synced 2026-03-04 01:50:18 +00:00
restructure rcloud-base as a single base controller (#37)
* restructure rcloud-base as a single base controller * updated master.rest * moved sentry from internal to pkg as it is used by relay * removing unused rpc and it's dependencies * Fix usermgmt tests * Don't redefine variables in rest file Co-authored-by: Abin Simon <abin.simon@rafay.co>
This commit is contained in:
22
pkg/controller/util/string.go
Normal file
22
pkg/controller/util/string.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package util
|
||||
|
||||
// ContainsString checks if string exists in slice
|
||||
func ContainsString(slice []string, s string) bool {
|
||||
for _, item := range slice {
|
||||
if item == s {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// RemoveString removes string from slick
|
||||
func RemoveString(slice []string, s string) (result []string) {
|
||||
for _, item := range slice {
|
||||
if item == s {
|
||||
continue
|
||||
}
|
||||
result = append(result, item)
|
||||
}
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user