golangci-lint: misc (#529)

This commit is contained in:
Vincent Serpoul
2021-04-28 08:29:00 +08:00
committed by GitHub
parent 1e80267558
commit 201d5dd422
6 changed files with 235 additions and 84 deletions
+2
View File
@@ -566,6 +566,7 @@ func fieldBoolTag(field reflect.StructField, tag string) bool {
return ok && x == "true"
}
//nolint:cyclop
func (enc *Encoder) encodeTable(b []byte, ctx encoderCtx, t table) ([]byte, error) {
var err error
@@ -580,6 +581,7 @@ func (enc *Encoder) encodeTable(b []byte, ctx encoderCtx, t table) ([]byte, erro
if err != nil {
return nil, err
}
if enc.indentTables && len(ctx.parentKey) > 0 {
ctx.indent++
}