update opentelemetry version #6
@@ -37,6 +37,17 @@ linters-settings:
|
||||
|
||||
linters:
|
||||
enable-all: true
|
||||
disable:
|
||||
- exhaustivestruct
|
||||
- maligned
|
||||
- deadcode
|
||||
- interfacer
|
||||
- golint
|
||||
- varcheck
|
||||
- nosnakecase
|
||||
- scopelint
|
||||
- ifshort
|
||||
- structcheck
|
||||
|
||||
issues:
|
||||
# Excluding configuration per-path, per-linter, per-text and per-source
|
||||
@@ -44,5 +55,5 @@ issues:
|
||||
- path: _test\.go
|
||||
linters:
|
||||
- gomnd
|
||||
- exhaustivestruct
|
||||
- ireturn
|
||||
- exhaustruct
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -118,7 +118,7 @@ func fakeSugarFields() []interface{} {
|
||||
}
|
||||
|
||||
func NewLogger() log.Logger {
|
||||
return log.New(log.WithWriter(ioutil.Discard))
|
||||
return log.New(log.WithWriter(io.Discard))
|
||||
}
|
||||
|
||||
func BenchmarkDisabledWithoutFields(b *testing.B) {
|
||||
|
||||
@@ -2,6 +2,7 @@ package field
|
||||
|
||||
import "time"
|
||||
|
||||
//nolint:interfacebloat
|
||||
type Encoder interface {
|
||||
// Built-in types.
|
||||
AddArray(key string, value Value)
|
||||
|
||||
@@ -261,7 +261,7 @@ func (f Field) AddTo(enc Encoder) {
|
||||
|
||||
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():
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user