diff --git a/configuration.go b/configuration.go index b05a18a..06fc0fb 100644 --- a/configuration.go +++ b/configuration.go @@ -2,6 +2,7 @@ package main import ( "bufio" + "errors" "log" "os" "strconv" @@ -74,7 +75,7 @@ func (conf *Configuration) StoreConfiguration(path string) (err error) { func (conf *Configuration) AddProcess(process string, configPath string) error { for _, v := range conf.Processes { if v == process { - return ErrIsOnList + return errors.New("process is already on list") } } @@ -93,5 +94,5 @@ func (conf *Configuration) RemoveProcess(process string, configPath string) erro } } - return ErrNotFound + return errors.New("process is not on list") } diff --git a/errors.go b/errors.go deleted file mode 100644 index 50bc8c4..0000000 --- a/errors.go +++ /dev/null @@ -1,9 +0,0 @@ -package main - -import "errors" - -// ErrNotFound occurs when a process is not presented in a list -var ErrNotFound = errors.New("process is not on list") - -// ErrIsOnList occurs when a process is already presented in a list -var ErrIsOnList = errors.New("process is already on list")