Skip to content

Commit

Permalink
Fix linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
stoewer committed Jul 2, 2024
1 parent 85134f7 commit 281eefc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
2 changes: 2 additions & 0 deletions pkg/traceql/ast.go
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,8 @@ func (o UnaryOperation) referencesSpan() bool {
// Statics
// **********************

// todo: remove once []string is implemented
// nolint: unused
type Static struct {
Type StaticType

Expand Down
1 change: 0 additions & 1 deletion pkg/traceql/ast_stringer.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ func (s Static) EncodeToString(quotes bool) string {
default:
return fmt.Sprintf("static(%d)", s.Type)
}

}

func (a Attribute) String() string {
Expand Down
13 changes: 3 additions & 10 deletions pkg/traceql/ast_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package traceql

import (
"fmt"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"math"
"testing"
"time"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

func TestNewStaticNil(t *testing.T) {
Expand Down Expand Up @@ -630,14 +631,6 @@ func TestSpansetFilterEvaluate(t *testing.T) {

var _ Span = (*mockSpan)(nil)

type AlternateStatic struct {
Type StaticType

valScalar uint64 // used for int, float64, bool, time.Duration, Kind, and Status
valBytes []byte // used for string, []int, []float64, []bool
valStrings []string // used for []string
}

type mockSpan struct {
id []byte
startTimeUnixNanos uint64
Expand Down
2 changes: 1 addition & 1 deletion pkg/traceql/engine_metrics_compare.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (m *MetricsCompare) observe(span Span) {
i := IntervalOf(st, m.qstart, m.qend, m.qstep)

// Determine if this span is inside the selection
var isSelection Static = StaticFalse
isSelection := StaticFalse
if m.start > 0 && m.end > 0 {
// Timestamp filtering
if st >= uint64(m.start) && st < uint64(m.end) {
Expand Down

0 comments on commit 281eefc

Please sign in to comment.