Skip to content

Commit

Permalink
lints
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitpatel96 committed Dec 20, 2024
1 parent b70b312 commit 4ecf1ca
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion processor/schemaprocessor/internal/translation/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (hp *httpProvider) Lookup(ctx context.Context, schemaURL string) (io.Reader
if err := resp.Body.Close(); err != nil {
return nil, err
}
if resp.StatusCode/100 != 2 {
if resp.StatusCode != http.StatusOK {
return nil, fmt.Errorf("invalid status code returned: %d", resp.StatusCode)
}
return content, nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ func (t *translator) ApplyScopeSpanChanges(ctx context.Context, scopeSpans ptrac
if err != nil {
return err
}

}
err = rev.spans.Rollback(span)
if err != nil {
Expand Down Expand Up @@ -276,7 +275,7 @@ func (t *translator) ApplyScopeMetricChanges(ctx context.Context, in pmetric.Sco
metric := in.Metrics().At(i)
switch status {
case Update:
if err := rev.all.Apply(metric); err != nil {
if err = rev.all.Apply(metric); err != nil {
return err
}
if err = rev.metrics.Apply(metric); err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,6 @@ func NewExampleSpans(tb testing.TB, at Version) ptrace.Traces {
tb.Log("Unknown trace version provided", at.String())
tb.FailNow()
}

}

return traces
Expand Down

0 comments on commit 4ecf1ca

Please sign in to comment.