Skip to content

Commit

Permalink
minor type fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vjeantet committed Dec 23, 2020
1 parent 6c43bc8 commit 53ca963
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions grok.go
Expand Up @@ -130,7 +130,7 @@ func (g *Grok) AddPatternsFromMap(m map[string]string) error {
func (g *Grok) addPatternsFromMap(m map[string]string) error {
patternDeps := graph{}
for k, v := range m {
keys := []string{}
var keys []string
for _, key := range normal.FindAllStringSubmatch(v, -1) {
if !valid.MatchString(key[1]) {
return fmt.Errorf("invalid pattern %%{%s}", key[1])
Expand Down Expand Up @@ -189,7 +189,7 @@ func (g *Grok) AddPatternsFromPath(path string) error {
}
}

file.Close()
_ = file.Close()
}

return g.AddPatternsFromMap(filePatterns)
Expand Down Expand Up @@ -372,7 +372,7 @@ func (g *Grok) denormalizePattern(pattern string, storedPatterns map[string]*gPa

//Merge type Informations
for k, v := range storedPattern.typeInfo {
//Lastest type information is the one to keep in memory
//Latest type information is the one to keep in memory
if _, ok := ti[k]; !ok {
ti[k] = v
}
Expand Down

0 comments on commit 53ca963

Please sign in to comment.