Skip to content

Commit

Permalink
change receiver type for ErrCollision
Browse files Browse the repository at this point in the history
  • Loading branch information
ajatprabha committed Jun 18, 2024
1 parent 7d12a4c commit e0d2878
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xload/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ func (e ErrInvalidPrefixAndKey) Error() string {
// Collision can happen when two or more fields have the same full key.
type ErrCollision struct{ keys []string }

func (e *ErrCollision) Error() string {
func (e ErrCollision) Error() string {
return fmt.Sprintf("xload: key collisions detected for keys: %v", e.keys)
}

// Keys returns the collided keys.
func (e *ErrCollision) Keys() []string {
func (e ErrCollision) Keys() []string {
keysCopy := make([]string, len(e.keys))
copy(keysCopy, e.keys)

Expand Down

0 comments on commit e0d2878

Please sign in to comment.