From b75f4b745df3d7889c16aa4f6e361d281e28e8b4 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Fri, 16 Oct 2020 00:03:52 +0200 Subject: [PATCH] Fix more staticchecks --- accounts/pkg/indexer/index/disk/autoincrement.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/accounts/pkg/indexer/index/disk/autoincrement.go b/accounts/pkg/indexer/index/disk/autoincrement.go index 9f73bf5c4..b26a90133 100644 --- a/accounts/pkg/indexer/index/disk/autoincrement.go +++ b/accounts/pkg/indexer/index/disk/autoincrement.go @@ -23,7 +23,6 @@ type Autoincrement struct { filesDir string indexBaseDir string indexRootDir string - entity interface{} bound *option.Bound } @@ -45,12 +44,12 @@ func NewAutoincrementIndex(o ...option.Option) index.Index { // validate the field if opts.Entity == nil { - // return error: entity needed for field validation + panic("invalid autoincrement index: configured without entity") } k, err := getKind(opts.Entity, opts.IndexBy) if !isValidKind(k) || err != nil { - panic("invalid index in non-numeric field") + panic("invalid autoincrement index: configured on non-numeric field") } return &Autoincrement{