fix lint errors (#937)

This commit is contained in:
Kevin Wan
2021-08-22 10:24:32 +08:00
committed by GitHub
parent 5b35fa17de
commit cd15c19250
5 changed files with 16 additions and 6 deletions

View File

@@ -55,6 +55,5 @@ func StartAgent(c Config) {
otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{}))
enabled.Set(true)
})
}

View File

@@ -67,7 +67,6 @@ func (w *clientStream) SendMsg(m interface{}) error {
func (w *clientStream) Header() (metadata.MD, error) {
md, err := w.ClientStream.Header()
if err != nil {
w.sendStreamEvent(errorEvent, err)
}
@@ -77,7 +76,6 @@ func (w *clientStream) Header() (metadata.MD, error) {
func (w *clientStream) CloseSend() error {
err := w.ClientStream.CloseSend()
if err != nil {
w.sendStreamEvent(errorEvent, err)
}

View File

@@ -24,7 +24,7 @@ func (s *metadataSupplier) Get(key string) string {
return values[0]
}
func (s *metadataSupplier) Set(key string, value string) {
func (s *metadataSupplier) Set(key, value string) {
s.metadata.Set(key, value)
}
@@ -35,6 +35,7 @@ func (s *metadataSupplier) Keys() []string {
}
return out
}
func Inject(ctx context.Context, p propagation.TextMapPropagator, metadata *metadata.MD) {
p.Inject(ctx, &metadataSupplier{
metadata: metadata,