Fix backend linter errors

This commit is contained in:
Alexander Zobnin
2023-08-30 12:48:38 +02:00
parent a536e6d8db
commit c06683cd37
12 changed files with 81 additions and 72 deletions

View File

@@ -12,7 +12,7 @@ func (item *Item) ExpandItemName() string {
name := item.Name
key := item.Key
if strings.Index(key, "[") == -1 {
if !strings.Contains(key, "[") {
return name
}
@@ -34,14 +34,13 @@ func expandItems(items []*Item) []*Item {
}
func splitKeyParams(paramStr string) []string {
paramRunes := []rune(paramStr)
params := []string{}
quoted := false
inArray := false
splitSymbol := ","
param := ""
for _, r := range paramRunes {
for _, r := range paramStr {
symbol := string(r)
if symbol == `"` && inArray {
param += symbol