Skip to content

Commit

Permalink
error: Remove the HasData method.
Browse files Browse the repository at this point in the history
Now that the data field is exported from the type, this helper method is no
longer carrying its weight.
  • Loading branch information
creachadair committed Sep 12, 2021
1 parent c677bac commit 14261a3
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions error.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 }

Expand Down

0 comments on commit 14261a3

Please sign in to comment.