mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-07 11:27:50 +00:00
Unexport Index.FieldPath
This commit is contained in:
parent
0648d0fc75
commit
1b6846d6e6
1 changed files with 5 additions and 5 deletions
10
index.go
10
index.go
|
|
@ -139,7 +139,7 @@ func (i *Index) openFields() error {
|
|||
continue
|
||||
}
|
||||
|
||||
fld, err := i.newField(i.FieldPath(filepath.Base(fi.Name())), filepath.Base(fi.Name()))
|
||||
fld, err := i.newField(i.fieldPath(filepath.Base(fi.Name())), filepath.Base(fi.Name()))
|
||||
if err != nil {
|
||||
return ErrName
|
||||
}
|
||||
|
|
@ -236,8 +236,8 @@ func (i *Index) setRemoteMaxShard(newmax uint64) {
|
|||
i.remoteMaxShard = newmax
|
||||
}
|
||||
|
||||
// FieldPath returns the path to a field in the index.
|
||||
func (i *Index) FieldPath(name string) string { return filepath.Join(i.path, name) }
|
||||
// fieldPath returns the path to a field in the index.
|
||||
func (i *Index) fieldPath(name string) string { return filepath.Join(i.path, name) }
|
||||
|
||||
// Field returns a field in the index by name.
|
||||
func (i *Index) Field(name string) *Field {
|
||||
|
|
@ -331,7 +331,7 @@ func (i *Index) createField(name string, opt FieldOptions) (*Field, error) {
|
|||
}
|
||||
|
||||
// Initialize field.
|
||||
f, err := i.newField(i.FieldPath(name), name)
|
||||
f, err := i.newField(i.fieldPath(name), name)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "initializing")
|
||||
}
|
||||
|
|
@ -387,7 +387,7 @@ func (i *Index) DeleteField(name string) error {
|
|||
}
|
||||
|
||||
// Delete field directory.
|
||||
if err := os.RemoveAll(i.FieldPath(name)); err != nil {
|
||||
if err := os.RemoveAll(i.fieldPath(name)); err != nil {
|
||||
return errors.Wrap(err, "removing directory")
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue