feat(example): Demonstrate usage of x_defs flag to buildGo.program

This commit is contained in:
Vincent Ambo 2019-11-24 20:41:29 +00:00
parent 0fd7466922
commit 473421dbb8
2 changed files with 7 additions and 0 deletions

View file

@ -40,4 +40,8 @@ in buildGo.program {
examplePackage
exampleProto
];
x_defs = {
"main.Flag" = "successfully";
};
}

View file

@ -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)
}