Lining fixes, linter and CI fixes.
This commit is contained in:
parent
de2b64ddcc
commit
4d9888d73f
@ -19,6 +19,7 @@ lint:
|
||||
tags:
|
||||
- docker
|
||||
script:
|
||||
- pwd
|
||||
- golangci-lint linters
|
||||
- golangci-lint run
|
||||
|
||||
@ -27,4 +28,5 @@ test:
|
||||
tags:
|
||||
- docker
|
||||
script:
|
||||
- pwd
|
||||
- go test -test.v -cover ./...
|
@ -6,5 +6,5 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
EventNotFoundError = errors.New("event not found")
|
||||
ErrEventNotFound = errors.New("event not found")
|
||||
)
|
||||
|
@ -49,7 +49,7 @@ func AddEventHandler(event *EventHandler) {
|
||||
func LaunchEvent(eventName string, data interface{}) (interface{}, error) {
|
||||
handler, exists := events[eventName]
|
||||
if !exists {
|
||||
return nil, EventNotFoundError
|
||||
return nil, ErrEventNotFound
|
||||
}
|
||||
|
||||
returnedData := handler.Handler(data)
|
||||
|
Loading…
Reference in New Issue
Block a user