0
0
Fork 0

more golint simplifications

This commit is contained in:
Marty Schoch 2016-10-02 11:30:58 -04:00
parent c36eb74ead
commit 667371dbec
11 changed files with 22 additions and 22 deletions

View File

@ -75,8 +75,8 @@ func (c *AnalyzerCache) DefineAnalyzer(name string, typ string, config map[strin
func AnalyzerTypesAndInstances() ([]string, []string) {
emptyConfig := map[string]interface{}{}
emptyCache := NewCache()
types := make([]string, 0)
instances := make([]string, 0)
var types []string
var instances []string
for name, cons := range analyzers {
_, err := cons(emptyConfig, emptyCache)
if err == nil {

View File

@ -75,8 +75,8 @@ func (c *CharFilterCache) DefineCharFilter(name string, typ string, config map[s
func CharFilterTypesAndInstances() ([]string, []string) {
emptyConfig := map[string]interface{}{}
emptyCache := NewCache()
types := make([]string, 0)
instances := make([]string, 0)
var types []string
var instances []string
for name, cons := range charFilters {
_, err := cons(emptyConfig, emptyCache)
if err == nil {

View File

@ -75,8 +75,8 @@ func (c *DateTimeParserCache) DefineDateTimeParser(name string, typ string, conf
func DateTimeParserTypesAndInstances() ([]string, []string) {
emptyConfig := map[string]interface{}{}
emptyCache := NewCache()
types := make([]string, 0)
instances := make([]string, 0)
var types []string
var instances []string
for name, cons := range dateTimeParsers {
_, err := cons(emptyConfig, emptyCache)
if err == nil {

View File

@ -75,8 +75,8 @@ func (c *FragmentFormatterCache) DefineFragmentFormatter(name string, typ string
func FragmentFormatterTypesAndInstances() ([]string, []string) {
emptyConfig := map[string]interface{}{}
emptyCache := NewCache()
types := make([]string, 0)
instances := make([]string, 0)
var types []string
var instances []string
for name, cons := range fragmentFormatters {
_, err := cons(emptyConfig, emptyCache)
if err == nil {

View File

@ -75,8 +75,8 @@ func (c *FragmenterCache) DefineFragmenter(name string, typ string, config map[s
func FragmenterTypesAndInstances() ([]string, []string) {
emptyConfig := map[string]interface{}{}
emptyCache := NewCache()
types := make([]string, 0)
instances := make([]string, 0)
var types []string
var instances []string
for name, cons := range fragmenters {
_, err := cons(emptyConfig, emptyCache)
if err == nil {

View File

@ -75,8 +75,8 @@ func (c *HighlighterCache) DefineHighlighter(name string, typ string, config map
func HighlighterTypesAndInstances() ([]string, []string) {
emptyConfig := map[string]interface{}{}
emptyCache := NewCache()
types := make([]string, 0)
instances := make([]string, 0)
var types []string
var instances []string
for name, cons := range highlighters {
_, err := cons(emptyConfig, emptyCache)
if err == nil {

View File

@ -36,8 +36,8 @@ func IndexTypeConstructorByName(name string) IndexTypeConstructor {
}
func IndexTypesAndInstances() ([]string, []string) {
types := make([]string, 0)
instances := make([]string, 0)
var types []string
var instances []string
for name := range stores {
types = append(types, name)
}

View File

@ -36,8 +36,8 @@ func KVStoreConstructorByName(name string) KVStoreConstructor {
}
func KVStoreTypesAndInstances() ([]string, []string) {
types := make([]string, 0)
instances := make([]string, 0)
var types []string
var instances []string
for name := range stores {
types = append(types, name)
}

View File

@ -75,8 +75,8 @@ func (c *TokenFilterCache) DefineTokenFilter(name string, typ string, config map
func TokenFilterTypesAndInstances() ([]string, []string) {
emptyConfig := map[string]interface{}{}
emptyCache := NewCache()
types := make([]string, 0)
instances := make([]string, 0)
var types []string
var instances []string
for name, cons := range tokenFilters {
_, err := cons(emptyConfig, emptyCache)
if err == nil {

View File

@ -75,8 +75,8 @@ func (c *TokenMapCache) DefineTokenMap(name string, typ string, config map[strin
func TokenMapTypesAndInstances() ([]string, []string) {
emptyConfig := map[string]interface{}{}
emptyCache := NewCache()
types := make([]string, 0)
instances := make([]string, 0)
var types []string
var instances []string
for name, cons := range tokenMaps {
_, err := cons(emptyConfig, emptyCache)
if err == nil {

View File

@ -75,8 +75,8 @@ func (c *TokenizerCache) DefineTokenizer(name string, typ string, config map[str
func TokenizerTypesAndInstances() ([]string, []string) {
emptyConfig := map[string]interface{}{}
emptyCache := NewCache()
types := make([]string, 0)
instances := make([]string, 0)
var types []string
var instances []string
for name, cons := range tokenizers {
_, err := cons(emptyConfig, emptyCache)
if err == nil {