From 14261a3514e2fcfbaf39cf86d36767e0c174e7da Mon Sep 17 00:00:00 2001 From: "M. J. Fromberger" Date: Sat, 11 Sep 2021 17:14:26 -0700 Subject: [PATCH] error: Remove the HasData method. Now that the data field is exported from the type, this helper method is no longer carrying its weight. --- error.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/error.go b/error.go index 4b66f16..a3daadd 100644 --- a/error.go +++ b/error.go @@ -18,9 +18,6 @@ type Error struct { // Error renders e to a human-readable string for the error interface. func (e Error) Error() string { return fmt.Sprintf("[%d] %s", e.Code, e.Message) } -// HasData reports whether e has error data to unmarshal. -func (e Error) HasData() bool { return len(e.Data) != 0 } - // ErrCode trivially satisfies the code.ErrCoder interface for an *Error. func (e Error) ErrCode() code.Code { return e.Code }