update golint
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
andrey1s
2022-09-06 22:20:42 +03:00
parent 5eb77a7858
commit d0f3c7e4d0
9 changed files with 25 additions and 13 deletions

View File

@@ -2,6 +2,7 @@ package field
import "time"
//nolint:interfacebloat
type Encoder interface {
// Built-in types.
AddArray(key string, value Value)

View File

@@ -255,13 +255,13 @@ type Field struct {
value Value
}
//nolint: gocyclo,cyclop
//nolint:gocyclo,cyclop
func (f Field) AddTo(enc Encoder) {
key := string(f.key)
switch {
case f.value.IsArray():
enc.AddAny(key, f.value)
enc.AddArray(key, f.value)
case f.value.IsNil():
enc.AddNil(key)
case f.value.IsBool():

View File

@@ -6,7 +6,7 @@ import (
type Key string
//nolint: gocyclo,funlen,cyclop
//nolint:funlen,cyclop,gocyclo
func (k Key) Any(value interface{}) Field {
switch val := value.(type) {
case string:

View File

@@ -24,7 +24,7 @@ func (v Value) MarshalJSON() ([]byte, error) {
return b, nil
}
//nolint: gocyclo,gomnd,cyclop
//nolint:gocyclo,gomnd,cyclop
func (v Value) String() string {
switch {
case v.vtype.IsArray(), v.vtype.IsAny():
@@ -62,7 +62,7 @@ func (v Value) String() string {
return fmt.Sprintf("%+v", v.AsInterface())
}
//nolint: gocyclo,cyclop
//nolint:gocyclo,cyclop
func (v Value) AsInterface() interface{} {
switch {
case v.vtype.IsArray():