mirror of
https://github.com/Infisical/infisical.git
synced 2026-01-11 08:28:11 -05:00
18 lines
324 B
Go
18 lines
324 B
Go
package models
|
|
|
|
import log "github.com/sirupsen/logrus"
|
|
|
|
// Custom error type so that we can give helpful messages in CLI
|
|
type Error struct {
|
|
Err error
|
|
FriendlyMessage string
|
|
}
|
|
|
|
func (e *Error) printFriendlyMessage() {
|
|
log.Infoln(e.FriendlyMessage)
|
|
}
|
|
|
|
func (e *Error) printDebuError() {
|
|
log.Debugln(e.Err)
|
|
}
|