Skip to content

Commit

Permalink
Fix linter complains in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ksysoev committed Aug 17, 2024
1 parent 5f5a2fb commit 106b3c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func NewDerivAPI(endpoint string, appID int, lang string, origin string, opts ..
}

if lang == "" || len(lang) != 2 {
return nil, fmt.Errorf("Invalid language")
return nil, fmt.Errorf("invalid language")
}

query := urlEnpoint.Query()
Expand Down
8 changes: 4 additions & 4 deletions subscriptions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func TestForget(t *testing.T) {
sub := NewSubcription[schema.TicksResp, schema.TicksResp](api)

if sub == nil {
t.Errorf("Expected a subscription, but got nil")
t.Fatal("Expected a subscription, but got nil")
}

reqID := api.getNextRequestID()
Expand All @@ -226,7 +226,7 @@ func TestForget(t *testing.T) {
}

if sub.Stream == nil {
t.Errorf("Expected a stream, but got nil")
t.Fatal("Expected a stream, but got nil")
}

if sub.IsActive() != true {
Expand Down Expand Up @@ -302,7 +302,7 @@ func TestForgetFailed(t *testing.T) {
sub := NewSubcription[schema.TicksResp, schema.TicksResp](api)

if sub == nil {
t.Errorf("Expected a subscription, but got nil")
t.Fatal("Expected a subscription, but got nil")
}

reqID := api.getNextRequestID()
Expand All @@ -315,7 +315,7 @@ func TestForgetFailed(t *testing.T) {
}

if sub.Stream == nil {
t.Errorf("Expected a stream, but got nil")
t.Fatal("Expected a stream, but got nil")
}

if sub.IsActive() != true {
Expand Down

0 comments on commit 106b3c8

Please sign in to comment.