feat(example): Demonstrate usage of x_defs flag to buildGo.program
This commit is contained in:
parent
0fd7466922
commit
473421dbb8
2 changed files with 7 additions and 0 deletions
|
@ -40,4 +40,8 @@ in buildGo.program {
|
||||||
examplePackage
|
examplePackage
|
||||||
exampleProto
|
exampleProto
|
||||||
];
|
];
|
||||||
|
|
||||||
|
x_defs = {
|
||||||
|
"main.Flag" = "successfully";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var Flag string = "unsuccessfully"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
thing := exampleproto.Thing{
|
thing := exampleproto.Thing{
|
||||||
Id: example.UUID(),
|
Id: example.UUID(),
|
||||||
|
@ -19,4 +21,5 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Printf("The thing is a %s with ID %q\n", thing.Id, thing.KindOfThing)
|
fmt.Printf("The thing is a %s with ID %q\n", thing.Id, thing.KindOfThing)
|
||||||
|
fmt.Printf("The flag has been %s set\n", Flag)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue