Merge pull request #32 from Pungyeon/minor_cleanup

changed made based on issue 28
This commit is contained in:
Lasse Martin Jakobsen 2019-08-05 10:44:41 +02:00 committed by GitHub
commit 708a68628a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -296,7 +296,8 @@ Once we're done with our first attempt at refactoring the function, we can proce
```go
func GetItem(extension string) (Item, error) {
if ref, ok := getReference(extension) {
ref, ok := getReference(extension)
if !ok {
return EmptyItem, ErrReferenceNotFound
}
return getItemByReference(ref)
@ -748,7 +749,7 @@ type ErrorDetails interface {
type errDetails struct {
errtype error
details string
details interface{}
}
func NewErrorDetails(err error, details ...interface{}) ErrorDetails {