Replies: 1 comment
-
In your example, Scriggo calls the To export data, for example, you can define a global variable in a package and assign the data to be exported to this variable: package main
import (
"github.com/mrdarthwader/commander" //local package
)
type Test struct {
Data string
dataNest nested
}
type nested struct {
test2 string
}
func main() {
commander.OnEnabled("Test plugin")
commander.Data = Register("name")
}
func Register(name string) Test {
nested := new(nested)
nested.test2 = "load test value"
return Test{
Data: name,
dataNest: *nested,
}
} After execution you can read from the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello dear developers,
I couldn't find any information about exporting data in Scriggo's wiki. Is it possible?
Can I read the value returned from the register function with my main application, if possible how?
Beta Was this translation helpful? Give feedback.
All reactions