rename variable with _
This commit is contained in:
parent
667371dbec
commit
ee6b698edb
|
@ -21,18 +21,18 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func RegisterIndexType(name string, constructor IndexTypeConstructor) {
|
func RegisterIndexType(name string, constructor IndexTypeConstructor) {
|
||||||
_, exists := index_types[name]
|
_, exists := indexTypes[name]
|
||||||
if exists {
|
if exists {
|
||||||
panic(fmt.Errorf("attempted to register duplicate index encoding named '%s'", name))
|
panic(fmt.Errorf("attempted to register duplicate index encoding named '%s'", name))
|
||||||
}
|
}
|
||||||
index_types[name] = constructor
|
indexTypes[name] = constructor
|
||||||
}
|
}
|
||||||
|
|
||||||
type IndexTypeConstructor func(storeName string, storeConfig map[string]interface{}, analysisQueue *index.AnalysisQueue) (index.Index, error)
|
type IndexTypeConstructor func(storeName string, storeConfig map[string]interface{}, analysisQueue *index.AnalysisQueue) (index.Index, error)
|
||||||
type IndexTypeRegistry map[string]IndexTypeConstructor
|
type IndexTypeRegistry map[string]IndexTypeConstructor
|
||||||
|
|
||||||
func IndexTypeConstructorByName(name string) IndexTypeConstructor {
|
func IndexTypeConstructorByName(name string) IndexTypeConstructor {
|
||||||
return index_types[name]
|
return indexTypes[name]
|
||||||
}
|
}
|
||||||
|
|
||||||
func IndexTypesAndInstances() ([]string, []string) {
|
func IndexTypesAndInstances() ([]string, []string) {
|
||||||
|
|
|
@ -22,7 +22,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var stores = make(KVStoreRegistry, 0)
|
var stores = make(KVStoreRegistry, 0)
|
||||||
var index_types = make(IndexTypeRegistry, 0)
|
var indexTypes = make(IndexTypeRegistry, 0)
|
||||||
|
|
||||||
// highlight
|
// highlight
|
||||||
var fragmentFormatters = make(FragmentFormatterRegistry, 0)
|
var fragmentFormatters = make(FragmentFormatterRegistry, 0)
|
||||||
|
|
Loading…
Reference in New Issue