Skip to content

Commit

Permalink
Address staticcheck issues
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Burman <[email protected]>
  • Loading branch information
burmanm committed Jul 31, 2019
1 parent 6095ca2 commit 4a9839c
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 5 deletions.
2 changes: 1 addition & 1 deletion plugin/storage/badger/spanstore/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ func (r *TraceReader) ScanDependencyIndex(startTimeMin time.Time, startTimeMax t
ServiceName: serviceName,
},
References: []model.SpanRef{
model.SpanRef{
{
SpanID: model.SpanID(binary.BigEndian.Uint64(parentSpanID)),
},
},
Expand Down
19 changes: 16 additions & 3 deletions plugin/storage/badger/spanstore/schema_manager.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright (c) 2019 The Jaeger Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package spanstore

import (
Expand All @@ -6,8 +20,9 @@ import (

"github.com/dgraph-io/badger"
"github.com/golang/protobuf/proto"
"github.com/jaegertracing/jaeger/model"
"go.uber.org/zap"

"github.com/jaegertracing/jaeger/model"
)

const (
Expand All @@ -16,7 +31,6 @@ const (
currentVersion uint32 = 1
spanKeyPrefixVer0 byte = 0x80
indexKeyRangeVer0 byte = 0x0F
protoEncodingVer0 byte = 0x02 // Ver0 was shipped with only protoEncoding allowed
depIndexKeyVer1 byte = 0x85
)

Expand Down Expand Up @@ -74,7 +88,6 @@ func SchemaUpdate(store *badger.DB, logger *zap.Logger) error {
fallthrough
default:
err = setSchemaVersion(store, currentVersion)
break
}

return err
Expand Down
18 changes: 17 additions & 1 deletion plugin/storage/badger/spanstore/schema_manager_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright (c) 2019 The Jaeger Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package spanstore

import (
Expand All @@ -7,9 +21,10 @@ import (

"github.com/dgraph-io/badger"
"github.com/gogo/protobuf/proto"
"github.com/jaegertracing/jaeger/model"
"github.com/stretchr/testify/assert"
"go.uber.org/zap"

"github.com/jaegertracing/jaeger/model"
)

/*
Expand Down Expand Up @@ -50,6 +65,7 @@ func TestSchemaMigrate(t *testing.T) {
depKey := createVer1DepKey(testSpan)
item, err = txn.Get(depKey)
assert.NoError(t, err)
assert.NotNil(t, item)
return nil
})
assert.NoError(t, err)
Expand Down

0 comments on commit 4a9839c

Please sign in to comment.