Sfoglia il codice sorgente

chore: check interface satisfaction w/o allocating new variable (#1454)

Letian Jiang 3 anni fa
parent
commit
ce05c429fc
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      core/trace/tracer.go

+ 1 - 1
core/trace/tracer.go

@@ -10,7 +10,7 @@ import (
 )
 
 // assert that metadataSupplier implements the TextMapCarrier interface
-var _ propagation.TextMapCarrier = new(metadataSupplier)
+var _ propagation.TextMapCarrier = (*metadataSupplier)(nil)
 
 type metadataSupplier struct {
 	metadata *metadata.MD