Skip to content

Commit

Permalink
chore: fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
Stebalien committed Mar 24, 2020
1 parent e1c5faa commit c46e00e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 19 deletions.
7 changes: 2 additions & 5 deletions log.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,10 +336,7 @@ func (el *ZapEventLogger) Event(ctx context.Context, event string, metadata ...L
existing = Metadata{}
}
loggables = append(loggables, existing)

for _, datum := range metadata {
loggables = append(loggables, datum)
}
loggables = append(loggables, metadata...)

e := entry{
loggables: loggables,
Expand Down Expand Up @@ -367,7 +364,7 @@ func (el *ZapEventLogger) Event(ctx context.Context, event string, metadata ...L
return
}

writer.WriterGroup.Write(buf.Bytes())
_, _ = writer.WriterGroup.Write(buf.Bytes())
}

// DEPRECATED
Expand Down
2 changes: 0 additions & 2 deletions tracer/propagation_ot.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ import (
)

type textMapPropagator struct {
tracer *LoggableTracer
}
type binaryPropagator struct {
tracer *LoggableTracer
}

const (
Expand Down
2 changes: 1 addition & 1 deletion tracer/recorder.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,5 @@ func (r *LoggableSpanRecorder) RecordSpan(span RawSpan) {
return
}

writer.WriterGroup.Write(buf.Bytes())
_, _ = writer.WriterGroup.Write(buf.Bytes())
}
15 changes: 4 additions & 11 deletions writer/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ type MirrorWriter struct {
msgSync chan []byte
}

type writerSync struct {
w io.WriteCloser
br chan []byte
}

// NewMirrorWriter initializes and returns a MirrorWriter.
func NewMirrorWriter() *MirrorWriter {
mw := &MirrorWriter{
Expand Down Expand Up @@ -216,13 +211,11 @@ func (bw *bufWriter) loop() {
if nextMsg == nil || nextCh == nil {
// nextCh == nil implies we are 'dead' and draining the incoming channel
// until the caller notices and closes it for us
select {
case b, ok := <-incoming:
if !ok {
return
}
nextMsg = b
b, ok := <-incoming
if !ok {
return
}
nextMsg = b
}

select {
Expand Down

0 comments on commit c46e00e

Please sign in to comment.