Skip to content

Commit

Permalink
fix: golangci-lint errors
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Gasch <[email protected]>
  • Loading branch information
embano1 committed Oct 20, 2024
1 parent f647779 commit 4cbbe69
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions v2/client/receiver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ func TestReceiverFnInvalidTypes(t *testing.T) {

func TestReceiverFnInvoke_1(t *testing.T) {
key := struct{}{}

//nolint:staticcheck
wantCtx := context.WithValue(context.TODO(), key, "UNIT TEST")
wantEvent := event.Event{
Context: &event.EventContextV1{ID: "UNIT TEST"},
Expand Down Expand Up @@ -124,6 +126,8 @@ func TestReceiverFnInvoke_1(t *testing.T) {

func TestReceiverFnInvoke_2(t *testing.T) {
key := struct{}{}

//nolint:staticcheck
ctx := context.WithValue(context.TODO(), key, "UNIT TEST")
wantEvent := event.Event{
Context: &event.EventContextV1{
Expand Down Expand Up @@ -158,6 +162,8 @@ func TestReceiverFnInvoke_2(t *testing.T) {

func TestReceiverFnInvoke_3(t *testing.T) {
key := struct{}{}

//nolint:staticcheck
ctx := context.WithValue(context.TODO(), key, "UNIT TEST")
wantEvent := event.Event{
Context: &event.EventContextV1{
Expand Down Expand Up @@ -192,6 +198,8 @@ func TestReceiverFnInvoke_3(t *testing.T) {

func TestReceiverFnInvoke_4(t *testing.T) {
key := struct{}{}

//nolint:staticcheck
ctx := context.WithValue(context.TODO(), key, "UNIT TEST")
wantResp := &event.Event{
Context: &event.EventContextV1{ID: "UNIT TEST"},
Expand All @@ -218,6 +226,8 @@ func TestReceiverFnInvoke_4(t *testing.T) {

func TestReceiverFnInvoke_5(t *testing.T) {
key := struct{}{}

//nolint:staticcheck
ctx := context.WithValue(context.TODO(), key, "UNIT TEST")

var wantResp *event.Event
Expand Down
2 changes: 1 addition & 1 deletion v2/event/eventcontext_v03.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ func (ec EventContextV03) String() string {
b.WriteString(" datacontentencoding: " + *ec.DataContentEncoding + "\n")
}

if ec.Extensions != nil && len(ec.Extensions) > 0 {
if len(ec.Extensions) > 0 {
b.WriteString("Extensions,\n")
keys := make([]string, 0, len(ec.Extensions))
for k := range ec.Extensions {
Expand Down
2 changes: 1 addition & 1 deletion v2/event/eventcontext_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ func (ec EventContextV1) String() string {
b.WriteString(" datacontenttype: " + *ec.DataContentType + "\n")
}

if ec.Extensions != nil && len(ec.Extensions) > 0 {
if len(ec.Extensions) > 0 {
b.WriteString("Extensions,\n")
keys := make([]string, 0, len(ec.Extensions))
for k := range ec.Extensions {
Expand Down

0 comments on commit 4cbbe69

Please sign in to comment.