qrz/vendor/github.com/jcmturner/rpc/v2/ndr/error.go
Paul Lecuq d4b9954636
Some checks failed
continuous-integration/drone/push Build is failing
updated qrz with postgresql support
2020-06-01 14:34:37 +02:00

19 lines
482 B
Go

package ndr
import "fmt"
// Malformed implements the error interface for malformed NDR encoding errors.
type Malformed struct {
EText string
}
// Error implements the error interface on the Malformed struct.
func (e Malformed) Error() string {
return fmt.Sprintf("malformed NDR stream: %s", e.EText)
}
// Errorf formats an error message into a malformed NDR error.
func Errorf(format string, a ...interface{}) Malformed {
return Malformed{EText: fmt.Sprintf(format, a...)}
}