Extracing increment tag

This commit is contained in:
Asdine El Hrychy
2016-10-08 00:36:51 +02:00
parent 617352c47f
commit 39cd85d6eb
8 changed files with 58 additions and 37 deletions

View File

@@ -36,8 +36,12 @@ func (n *node) deleteStruct(tx *bolt.Tx, cfg *structConfig, id []byte) error {
return ErrNotFound
}
for fieldName, idxInfo := range cfg.Fields {
idx, err := getIndex(bucket, idxInfo.Type, fieldName)
for fieldName, fieldCfg := range cfg.Fields {
if fieldCfg.Index == "" {
continue
}
idx, err := getIndex(bucket, fieldCfg.Index, fieldName)
if err != nil {
return err
}