Lining fixes, linter and CI fixes.

This commit is contained in:
Stanislav Nikitin 2019-09-02 20:09:31 +05:00
parent de2b64ddcc
commit 4d9888d73f
No known key found for this signature in database
GPG Key ID: 106900B32F8192EE
3 changed files with 4 additions and 2 deletions

View File

@ -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 ./...

View File

@ -6,5 +6,5 @@ import (
)
var (
EventNotFoundError = errors.New("event not found")
ErrEventNotFound = errors.New("event not found")
)

View File

@ -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)