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) { func AnalyzerTypesAndInstances() ([]string, []string) {
emptyConfig := map[string]interface{}{} emptyConfig := map[string]interface{}{}
emptyCache := NewCache() emptyCache := NewCache()
types := make([]string, 0) var types []string
instances := make([]string, 0) var instances []string
for name, cons := range analyzers { for name, cons := range analyzers {
_, err := cons(emptyConfig, emptyCache) _, err := cons(emptyConfig, emptyCache)
if err == nil { if err == nil {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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