Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup: fix staticcheck failures #84

Merged
merged 1 commit into from
Jul 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func (p *PubsubValueStore) Subscribe(key string) error {
defer p.mx.Unlock()

// see if we already have a pubsub subscription; if not, subscribe
ti, ok := p.topics[key]
_, ok := p.topics[key]
if ok {
return nil
}
Expand Down
8 changes: 3 additions & 5 deletions pubsub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ func (testValidator) Validate(key string, value []byte) error {
return record.ErrInvalidRecordType
}
return nil

}

func (testValidator) Select(key string, vals [][]byte) (int, error) {
Expand Down Expand Up @@ -151,7 +150,6 @@ func TestEarlyPublish(t *testing.T) {
for i, vs := range vss {
checkValue(ctx, t, i, vs, key, val)
}

}

func TestPubsubPublishSubscribe(t *testing.T) {
Expand Down Expand Up @@ -189,7 +187,7 @@ func TestPubsubPublishSubscribe(t *testing.T) {

// Check selector.
nval := []byte("valid for key 1")
err = pub.PutValue(ctx, key, val)
err = pub.PutValue(ctx, key, nval)
if err != nil {
t.Fatal(err)
}
Expand All @@ -202,7 +200,7 @@ func TestPubsubPublishSubscribe(t *testing.T) {

// Check validator.
nval = []byte("valid for key 9999 invalid")
err = pub.PutValue(ctx, key, val)
err = pub.PutValue(ctx, key, nval)
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -293,7 +291,7 @@ func TestWatch(t *testing.T) {
t.Fatal(err)
}

ch, err = vss[1].SearchValue(ctx, key2)
_, err = vss[1].SearchValue(ctx, key2)
if err != nil {
t.Fatal(err)
}
Expand Down