fix lint
This commit is contained in:
parent
a94ea53eac
commit
7e7e55cc40
3 changed files with 15 additions and 3 deletions
|
@ -111,7 +111,10 @@ func LoadBuckets(files []string, dataFolder string) ([]BucketFactory, chan types
|
|||
)
|
||||
|
||||
var seed namegenerator.Generator = namegenerator.NewNameGenerator(time.Now().UTC().UnixNano())
|
||||
exprhelpers.Init()
|
||||
err := exprhelpers.Init()
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
response = make(chan types.Event, 1)
|
||||
for _, f := range files {
|
||||
|
@ -280,6 +283,9 @@ func LoadBucket(g *BucketFactory, dataFolder string) error {
|
|||
if len(g.Data) > 0 {
|
||||
for _, data := range g.Data {
|
||||
err = exprhelpers.FileInit(dataFolder, data.DestPath)
|
||||
if err != nil {
|
||||
log.Errorf(err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,10 @@ func LoadStages(stageFiles []Stagefile, pctx *UnixParserCtx) ([]Node, error) {
|
|||
tmpstages := make(map[string]bool)
|
||||
pctx.Stages = []string{}
|
||||
|
||||
exprhelpers.Init()
|
||||
err := exprhelpers.Init()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for _, stageFile := range stageFiles {
|
||||
if !strings.HasSuffix(stageFile.Filename, ".yaml") {
|
||||
log.Warningf("skip non yaml : %s", stageFile.Filename)
|
||||
|
@ -115,6 +118,9 @@ func LoadStages(stageFiles []Stagefile, pctx *UnixParserCtx) ([]Node, error) {
|
|||
if len(node.Data) > 0 {
|
||||
for _, data := range node.Data {
|
||||
err = exprhelpers.FileInit(pctx.DataFolder, data.DestPath)
|
||||
if err != nil {
|
||||
log.Errorf(err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
nodes = append(nodes, node)
|
||||
|
|
|
@ -16,7 +16,7 @@ type DataSource struct {
|
|||
}
|
||||
|
||||
type DataSet struct {
|
||||
Data []*DataSource `yaml:"data",omitempty`
|
||||
Data []*DataSource `yaml:"data,omitempty"`
|
||||
}
|
||||
|
||||
func downloadFile(url string, destPath string) error {
|
||||
|
|
Loading…
Add table
Reference in a new issue