util, lang, etcd: Move the error type to our util package
We use this error in a lot of places, let's centralize it a bit.
This commit is contained in:
@@ -29,19 +29,17 @@
|
||||
|
||||
package interfaces
|
||||
|
||||
// Error is a constant error type that implements error.
|
||||
type Error string
|
||||
|
||||
// Error fulfills the error interface of this type.
|
||||
func (e Error) Error() string { return string(e) }
|
||||
import (
|
||||
"github.com/purpleidea/mgmt/util"
|
||||
)
|
||||
|
||||
const (
|
||||
// ErrTypeCurrentlyUnknown is returned from the Type() call on Expr if
|
||||
// unification didn't run successfully and the type isn't obvious yet.
|
||||
ErrTypeCurrentlyUnknown = Error("type is currently unknown")
|
||||
ErrTypeCurrentlyUnknown = util.Error("type is currently unknown")
|
||||
|
||||
// ErrExpectedFileMissing is returned when a file that is used by an
|
||||
// import is missing. This might signal the downloader, or it might
|
||||
// signal a permanent error.
|
||||
ErrExpectedFileMissing = Error("file is currently missing")
|
||||
ErrExpectedFileMissing = util.Error("file is currently missing")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user