[MM-20723] Add golint for plugin package to golangci (#13090)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
d12bf77f53
Коммит
5122b9e292
@@ -84,18 +84,18 @@ func FieldListToEncodedErrors(structPrefix string, fieldList *ast.FieldList, fil
|
||||
}
|
||||
|
||||
if typeNameBuffer.String() != "error" {
|
||||
nextLetter += 1
|
||||
nextLetter++
|
||||
continue
|
||||
}
|
||||
|
||||
name := ""
|
||||
if len(field.Names) == 0 {
|
||||
name = string(nextLetter)
|
||||
nextLetter += 1
|
||||
nextLetter++
|
||||
} else {
|
||||
for range field.Names {
|
||||
name += string(nextLetter)
|
||||
nextLetter += 1
|
||||
nextLetter++
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,11 +125,11 @@ func FieldListDestruct(structPrefix string, fieldList *ast.FieldList, fileset *t
|
||||
}
|
||||
if len(field.Names) == 0 {
|
||||
result = append(result, structPrefix+string(nextLetter)+suffix)
|
||||
nextLetter += 1
|
||||
nextLetter++
|
||||
} else {
|
||||
for range field.Names {
|
||||
result = append(result, structPrefix+string(nextLetter)+suffix)
|
||||
nextLetter += 1
|
||||
nextLetter++
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -155,11 +155,11 @@ func FieldListToStructList(fieldList *ast.FieldList, fileset *token.FileSet) str
|
||||
}
|
||||
if len(field.Names) == 0 {
|
||||
result = append(result, string(nextLetter)+" "+typeName)
|
||||
nextLetter += 1
|
||||
nextLetter++
|
||||
} else {
|
||||
for range field.Names {
|
||||
result = append(result, string(nextLetter)+" "+typeName)
|
||||
nextLetter += 1
|
||||
nextLetter++
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user