Skip to content

Commit

Permalink
Address Feedback For Error Variable
Browse files Browse the repository at this point in the history
Signed-off-by: Mahad Zaryab <[email protected]>
  • Loading branch information
mahadzaryab1 committed Nov 19, 2024
1 parent 1175e6e commit 1683007
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions storage_v2/factoryadapter/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/jaegertracing/jaeger/storage_v2/spanstore"
)

var ErrV1ReaderNotAvailable = errors.New("v1 reader is not available")
var errV1ReaderNotAvailable = errors.New("spanstore.Reader is not a wrapper around v1 reader")

type TraceReader struct {
spanReader spanstore_v1.Reader
Expand All @@ -24,7 +24,7 @@ func GetV1Reader(reader spanstore.Reader) (spanstore_v1.Reader, error) {
if tr, ok := reader.(*TraceReader); ok {
return tr.spanReader, nil
}
return nil, ErrV1ReaderNotAvailable
return nil, errV1ReaderNotAvailable
}

func NewTraceReader(spanReader spanstore_v1.Reader) *TraceReader {
Expand Down
2 changes: 1 addition & 1 deletion storage_v2/factoryadapter/reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (*fakeReader) FindTraceIDs(_ context.Context, _ spanstore.TraceQueryParamet
func TestGetV1Reader_Error(t *testing.T) {
fr := &fakeReader{}
_, err := GetV1Reader(fr)
require.ErrorIs(t, err, ErrV1ReaderNotAvailable)
require.ErrorIs(t, err, errV1ReaderNotAvailable)
}

func TestTraceReader_GetTracePanics(t *testing.T) {
Expand Down

0 comments on commit 1683007

Please sign in to comment.