Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Spot
go2pins
Commits
c66354c8
Commit
c66354c8
authored
Mar 29, 2021
by
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
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
main.go
View file @
c66354c8
...
...
@@ -506,7 +506,10 @@ func insertGlobalInBlackbox(meta *transform.Meta, filename string) {
fmt
.
Println
(
os
.
Stderr
,
err
.
Error
())
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
)
if
err
!=
nil
{
fmt
.
Println
(
os
.
Stderr
,
err
.
Error
())
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment