Use fmt.Errorf to make Golint happy
authorbep <bjorn.erik.pedersen@gmail.com>
Tue, 21 Apr 2015 19:13:28 +0000 (21:13 +0200)
committerbep <bjorn.erik.pedersen@gmail.com>
Tue, 21 Apr 2015 19:13:30 +0000 (21:13 +0200)
hugolib/pagination.go

index f5380a337f7b93fd29b8f00c20a79105a09fdcaa..d5d409a363e8f0c217bbaf30018224c847b05e92 100644 (file)
@@ -286,7 +286,7 @@ func toPages(seq interface{}) (Pages, error) {
        case PageGroup:
                return (seq.(PageGroup)).Pages, nil
        default:
-               return nil, errors.New(fmt.Sprintf("unsupported type in paginate, got %T", seq))
+               return nil, fmt.Errorf("unsupported type in paginate, got %T", seq)
        }
 }