diff options
author | Wim <wim@42.be> | 2018-02-09 00:11:04 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2018-02-09 00:11:04 +0100 |
commit | 5aab158c0b0db64b6136fe2fdaca8b8e9e3bd811 (patch) | |
tree | 09bcb3f02f968867c2ca84db1f28594dd0afb967 /vendor/github.com/mattermost/platform/model/search_params.go | |
parent | 1d33e60e36fa7b0e361990ac347ee8d620d67dcc (diff) | |
download | matterbridge-msglm-5aab158c0b0db64b6136fe2fdaca8b8e9e3bd811.tar.gz matterbridge-msglm-5aab158c0b0db64b6136fe2fdaca8b8e9e3bd811.tar.bz2 matterbridge-msglm-5aab158c0b0db64b6136fe2fdaca8b8e9e3bd811.zip |
Update vendor (github.com/mattermost)
Diffstat (limited to 'vendor/github.com/mattermost/platform/model/search_params.go')
-rw-r--r-- | vendor/github.com/mattermost/platform/model/search_params.go | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/vendor/github.com/mattermost/platform/model/search_params.go b/vendor/github.com/mattermost/platform/model/search_params.go index 070ac6d2..2feea8da 100644 --- a/vendor/github.com/mattermost/platform/model/search_params.go +++ b/vendor/github.com/mattermost/platform/model/search_params.go @@ -31,16 +31,6 @@ func (o *SearchParams) ToJson() string { var searchFlags = [...]string{"from", "channel", "in"} -func splitWordsNoQuotes(text string) []string { - words := []string{} - - for _, word := range strings.Fields(text) { - words = append(words, word) - } - - return words -} - func splitWords(text string) []string { words := []string{} @@ -55,14 +45,14 @@ func splitWords(text string) []string { foundQuote = false location = i + 1 } else { - words = append(words, splitWordsNoQuotes(text[location:i])...) + words = append(words, strings.Fields(text[location:i])...) foundQuote = true location = i } } } - words = append(words, splitWordsNoQuotes(text[location:])...) + words = append(words, strings.Fields(text[location:])...) return words } |