Skip to content

Commit

Permalink
Fix minor issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiss, Tibor committed Feb 1, 2024
1 parent 38477d2 commit d2b3e81
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pkg/application/lister.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
emlogger "github.com/kyma-project/eventing-manager/pkg/logger"
)

var ErrFailedToConvertObjectToUnstructured = errors.New("failed to convert runtime object to unstructured") // Static error.
var ErrFailedToConvertObjectToUnstructured = errors.New("failed to convert runtime object to unstructured")

type Lister struct {
lister cache.GenericLister
Expand Down
4 changes: 2 additions & 2 deletions pkg/cloudevents/builder/generic.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/kyma-project/eventing-manager/pkg/logger"
)

var ErrEventTypeCannotHaveEmptySegments = fmt.Errorf("event type cannot have empty segments after cleaning") // Static error.
var ErrEventTypeCannotHaveEmptySegments = fmt.Errorf("event type cannot have empty segments after cleaning")

// Perform a compile-time check.
var _ CloudEventBuilder = &GenericBuilder{}
Expand Down Expand Up @@ -59,7 +59,7 @@ func (gb *GenericBuilder) Build(event ceevent.Event) (*ceevent.Event, error) {
// validate if the segments are not empty
segments := strings.Split(finalEventType, ".")
if DoesEmptySegmentsExist(segments) {
return nil, fmt.Errorf("ErrEventTypeCannotHaveEmptySegments %w: %s", ErrEventTypeCannotHaveEmptySegments, finalEventType)
return nil, fmt.Errorf("%w: %s", ErrEventTypeCannotHaveEmptySegments, finalEventType)
}
namedLogger.Debugf("using event type: %s", finalEventType)

Expand Down
2 changes: 1 addition & 1 deletion pkg/handler/handler_v1alpha1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
emlogger "github.com/kyma-project/eventing-manager/pkg/logger"
)

var ErrUnableToClean = fmt.Errorf("unable to clean") // Static error.
var ErrUnableToClean = fmt.Errorf("unable to clean")

func Test_extractCloudEventFromRequest(t *testing.T) {
type args struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/nats/connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/nats-io/nats.go"
)

var ErrNATSConnectionNotConnected = fmt.Errorf("NATS connection not connected") // Static error.
var ErrNATSConnectionNotConnected = fmt.Errorf("NATS connection not connected")

type Opt = nats.Option

Expand Down
2 changes: 1 addition & 1 deletion pkg/signals/signals.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"time"
)

var ErrReceivedTerminationSignal = errors.New("received a termination signal") // Static error
var ErrReceivedTerminationSignal = errors.New("received a termination signal")

//nolint:gochecknoglobals // defining channels
var (
Expand Down

0 comments on commit d2b3e81

Please sign in to comment.