Этот коммит содержится в:
Chris
2017-10-30 11:57:24 -05:00
коммит произвёл GitHub
родитель 63df41b911
Коммит c5e8cb25ca
49 изменённых файлов: 96 добавлений и 184 удалений

Просмотреть файл

@@ -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
}