about summary refs log tree commit diff
path: root/example
diff options
context:
space:
mode:
Diffstat (limited to 'example')
-rw-r--r--example/default.nix4
-rw-r--r--example/main.go3
2 files changed, 7 insertions, 0 deletions
diff --git a/example/default.nix b/example/default.nix
index 407f55079359..5abed1fbbcb5 100644
--- a/example/default.nix
+++ b/example/default.nix
@@ -40,4 +40,8 @@ in buildGo.program {
     examplePackage
     exampleProto
   ];
+
+  x_defs = {
+    "main.Flag" = "successfully";
+  };
 }
diff --git a/example/main.go b/example/main.go
index 1db1bb9e23e9..bbcedbff8726 100644
--- a/example/main.go
+++ b/example/main.go
@@ -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)
 }