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
|
||||
exampleProto
|
||||
];
|
||||
|
||||
x_defs = {
|
||||
"main.Flag" = "successfully";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -12,6 +12,8 @@ import (
|
|||
"fmt"
|
||||
)
|
||||
|
||||
var Flag string = "unsuccessfully"
|
||||
|
||||
func main() {
|
||||
thing := exampleproto.Thing{
|
||||
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 flag has been %s set\n", Flag)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue