open-vault/helper/hostutil/hostinfo_error.go
2019-10-18 12:08:35 -07:00

18 lines
330 B
Go

package hostutil
import "fmt"
// HostInfoError is a typed error for more convenient error checking.
type HostInfoError struct {
Type string
Err error
}
func (e *HostInfoError) WrappedErrors() []error {
return []error{e.Err}
}
func (e *HostInfoError) Error() string {
return fmt.Sprintf("%s: %s", e.Type, e.Err.Error())
}