Commit c66354c8 authored by Hugo Moreau's avatar Hugo Moreau
Browse files

Blackbox: Handling global array

Blackbox can now handle global array.

 * main.go : Here.
parent 4ad2dd7f
Pipeline #27067 passed with stage
in 2 minutes and 48 seconds
...@@ -506,7 +506,10 @@ func insertGlobalInBlackbox(meta *transform.Meta, filename string) { ...@@ -506,7 +506,10 @@ func insertGlobalInBlackbox(meta *transform.Meta, filename string) {
fmt.Println(os.Stderr, err.Error()) fmt.Println(os.Stderr, err.Error())
os.Exit(1) os.Exit(1)
} }
transform.Apply(node, meta, &transform.GlobalToState{GlobalVar: globalVar, GlobalBlackbox: globalObj}) transform.ApplyAll(node, meta, []transform.Transform{
&transform.GlobalToState{GlobalVar: globalVar, GlobalBlackbox: globalObj},
&transform.DoubleBrackets{},
})
file, err := os.OpenFile(filename, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0644) file, err := os.OpenFile(filename, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0644)
if err != nil { if err != nil {
fmt.Println(os.Stderr, err.Error()) fmt.Println(os.Stderr, err.Error())
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment