Move all error structs to common package 'errors'

Change-Id: I91e9610b27244fe5d7500575eae24647e256dab8
This commit is contained in:
Dmitry Ukov 2019-12-01 14:14:09 +04:00
parent 8dd721830b
commit c1ed28fd25
4 changed files with 15 additions and 16 deletions

View File

@ -1,14 +0,0 @@
package error
// AirshipError is the base error type
// used to create extended error types
// in other airshipctl packages.
type AirshipError struct {
Message string
}
// Error function implments the golang
// error interface
func (ae *AirshipError) Error() string {
return ae.Message
}

View File

@ -1,5 +1,18 @@
package errors
// AirshipError is the base error type
// used to create extended error types
// in other airshipctl packages.
type AirshipError struct {
Message string
}
// Error function implments the golang
// error interface
func (ae *AirshipError) Error() string {
return ae.Message
}
// ErrNotImplemented returned for not implemented features
type ErrNotImplemented struct {
}

View File

@ -3,7 +3,7 @@ package remote
import (
"fmt"
aerror "opendev.org/airship/airshipctl/pkg/error"
aerror "opendev.org/airship/airshipctl/pkg/errors"
)
type RemoteDirectError struct {

View File

@ -4,7 +4,7 @@ import (
"fmt"
"net/http"
aerror "opendev.org/airship/airshipctl/pkg/error"
aerror "opendev.org/airship/airshipctl/pkg/errors"
)
type RedfishClientError struct {