Skip to content

Commit

Permalink
util: add doc comments for exported functions in errors.go
Browse files Browse the repository at this point in the history
A number of exported functions in errors.go were missing doc comments.
Add them.

Signed-off-by: John Mulligan <[email protected]>
  • Loading branch information
phlogistonjohn committed Jun 17, 2020
1 parent c4c12fd commit 9949a2e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/util/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ type ErrKeyNotFound struct {
err error
}

// NewErrKeyNotFound returns a new ErrKeyNotFound error.
func NewErrKeyNotFound(keyName string, err error) ErrKeyNotFound {
return ErrKeyNotFound{keyName, err}
}

// Error returns the error string for ErrKeyNotFound.
func (e ErrKeyNotFound) Error() string {
return e.err.Error()
}
Expand All @@ -36,6 +38,7 @@ type ErrObjectExists struct {
err error
}

// Error returns the error string for ErrObjectExists.
func (e ErrObjectExists) Error() string {
return e.err.Error()
}
Expand All @@ -46,6 +49,7 @@ type ErrObjectNotFound struct {
err error
}

// Error returns the error string for ErrObjectNotFound.
func (e ErrObjectNotFound) Error() string {
return e.err.Error()
}
Expand All @@ -57,6 +61,7 @@ type ErrSnapNameConflict struct {
err error
}

// Error returns the error string for ErrSnapNameConflict.
func (e ErrSnapNameConflict) Error() string {
return e.err.Error()
}
Expand All @@ -72,10 +77,12 @@ type ErrPoolNotFound struct {
Err error
}

// Error returns the error string for ErrPoolNotFound.
func (e ErrPoolNotFound) Error() string {
return e.Err.Error()
}

// NewErrPoolNotFound returns a new ErrPoolNotFound error.
func NewErrPoolNotFound(pool string, err error) ErrPoolNotFound {
return ErrPoolNotFound{pool, err}
}

0 comments on commit 9949a2e

Please sign in to comment.