mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-07-06 08:24:03 +00:00
Update vendor (#1297)
This commit is contained in:
20
vendor/github.com/mattermost/mattermost-server/v5/model/utils.go
generated
vendored
20
vendor/github.com/mattermost/mattermost-server/v5/model/utils.go
generated
vendored
@ -36,6 +36,26 @@ type StringInterface map[string]interface{}
|
||||
type StringMap map[string]string
|
||||
type StringArray []string
|
||||
|
||||
func (sa StringArray) Remove(input string) StringArray {
|
||||
for index := range sa {
|
||||
if sa[index] == input {
|
||||
ret := make(StringArray, 0, len(sa)-1)
|
||||
ret = append(ret, sa[:index]...)
|
||||
return append(ret, sa[index+1:]...)
|
||||
}
|
||||
}
|
||||
return sa
|
||||
}
|
||||
|
||||
func (sa StringArray) Contains(input string) bool {
|
||||
for index := range sa {
|
||||
if sa[index] == input {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
func (sa StringArray) Equals(input StringArray) bool {
|
||||
|
||||
if len(sa) != len(input) {
|
||||
|
Reference in New Issue
Block a user