fix(search): fix mutating query state fields
Signed-off-by: Babak K. Shandiz <babakks@github.com>
This commit is contained in:
parent
df5e6d92a6
commit
81a1ce601c
1 changed files with 4 additions and 3 deletions
|
|
@ -149,15 +149,16 @@ func formatQualifiers(qs Qualifiers) []string {
|
|||
}
|
||||
|
||||
func formatKeywords(ks []string) []string {
|
||||
result := make([]string, len(ks))
|
||||
for i, k := range ks {
|
||||
before, after, found := strings.Cut(k, ":")
|
||||
if !found {
|
||||
ks[i] = quote(k)
|
||||
result[i] = quote(k)
|
||||
} else {
|
||||
ks[i] = fmt.Sprintf("%s:%s", before, quote(after))
|
||||
result[i] = fmt.Sprintf("%s:%s", before, quote(after))
|
||||
}
|
||||
}
|
||||
return ks
|
||||
return result
|
||||
}
|
||||
|
||||
// CamelToKebab returns a copy of the string s that is converted from camel case form to '-' separated form.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue