mirror of
https://github.com/nabbar/golib.git
synced 2025-10-05 15:56:50 +08:00
Rework Error interface
Package Errors: - add function to check & cast error interface into golib Error interface - update CodeError type to simplify management & error creation - add function to simplify call of Error function from a generic error interface - remove some useless function from Error interface All Other Packages: - apply change of package Errors into all other packages
This commit is contained in:
@@ -29,7 +29,6 @@ package database
|
||||
import (
|
||||
cfgtps "github.com/nabbar/golib/config/types"
|
||||
libctx "github.com/nabbar/golib/context"
|
||||
liberr "github.com/nabbar/golib/errors"
|
||||
liblog "github.com/nabbar/golib/logger"
|
||||
libver "github.com/nabbar/golib/version"
|
||||
libvpr "github.com/nabbar/golib/viper"
|
||||
@@ -103,11 +102,11 @@ func (o *componentDatabase) IsRunning() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (o *componentDatabase) Start() liberr.Error {
|
||||
func (o *componentDatabase) Start() error {
|
||||
return o._run()
|
||||
}
|
||||
|
||||
func (o *componentDatabase) Reload() liberr.Error {
|
||||
func (o *componentDatabase) Reload() error {
|
||||
return o._run()
|
||||
}
|
||||
|
||||
@@ -145,7 +144,7 @@ func (o *componentDatabase) Dependencies() []string {
|
||||
}
|
||||
}
|
||||
|
||||
func (o *componentDatabase) SetDependencies(d []string) liberr.Error {
|
||||
func (o *componentDatabase) SetDependencies(d []string) error {
|
||||
o.m.RLock()
|
||||
defer o.m.RUnlock()
|
||||
|
||||
|
Reference in New Issue
Block a user