From cbf821123ecf243d7c4abdf8694b80eccdd3c184 Mon Sep 17 00:00:00 2001 From: Cody Soyland Date: Thu, 5 Jul 2018 21:43:48 -0500 Subject: [PATCH] Unexport Field.MaxShard --- field.go | 4 ++-- index.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/field.go b/field.go index 69d08d504..02d7d9ce5 100644 --- a/field.go +++ b/field.go @@ -183,8 +183,8 @@ func (f *Field) Path() string { return f.path } // RowAttrStore returns the attribute storage. func (f *Field) RowAttrStore() AttrStore { return f.rowAttrStore } -// MaxShard returns the max shard in the field. -func (f *Field) MaxShard() uint64 { +// maxShard returns the max shard in the field. +func (f *Field) maxShard() uint64 { f.mu.RLock() defer f.mu.RUnlock() diff --git a/index.go b/index.go index 7217bb659..4b8b84ca8 100644 --- a/index.go +++ b/index.go @@ -220,7 +220,7 @@ func (i *Index) maxShard() uint64 { max := i.remoteMaxShard for _, f := range i.fields { - if shard := f.MaxShard(); shard > max { + if shard := f.maxShard(); shard > max { max = shard } }