You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-12-01 23:12:29 +02:00
Enable golint & gofmt, resolve issues (#214)
* Add golint to linters and resolve issues. I decided to remove constructors for some of the propagation types because the constructors can be reduced to either using the zero value or a single, non optional member. * Enable gofmt and commit fixes
This commit is contained in:
@@ -661,6 +661,7 @@ func TestObserver(t *testing.T) {
|
||||
}
|
||||
|
||||
func checkBatches(t *testing.T, ctx context.Context, labels LabelSet, meter *mockMeter, descriptor *Descriptor) {
|
||||
t.Helper()
|
||||
if len(meter.measurementBatches) != 3 {
|
||||
t.Errorf("Expected 3 recorded measurement batches, got %d", len(meter.measurementBatches))
|
||||
}
|
||||
|
||||
@@ -47,6 +47,6 @@ func (as alwaysSampleSampler) Description() string {
|
||||
|
||||
var _ Sampler = alwaysSampleSampler{}
|
||||
|
||||
func AlwaysSampleSampler() alwaysSampleSampler {
|
||||
func AlwaysSampleSampler() Sampler {
|
||||
return alwaysSampleSampler{}
|
||||
}
|
||||
|
||||
@@ -47,6 +47,6 @@ func (ns neverSampleSampler) Description() string {
|
||||
|
||||
var _ Sampler = neverSampleSampler{}
|
||||
|
||||
func NeverSampleSampler() neverSampleSampler {
|
||||
func NeverSampleSampler() Sampler {
|
||||
return neverSampleSampler{}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user