about summary refs log tree commit diff
path: root/tools/gotest/main.go
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-11-22T16·28+0000
committerVincent Ambo <tazjin@google.com>2019-11-22T16·28+0000
commit1619f58d782ae4de67a056757efbbdc91ce30367 (patch)
tree4b1e79ff9e976d8082747d79bb5212092f89f357 /tools/gotest/main.go
parent9ea0363e6f34a9f41b3c849359c97f06dbec2b9f (diff)
feat(tools): Add 'gotest' program to demonstrate pkgs.buildGo
This is a tiny program that does nothing but exists to demonstrate
pkgs.buildGo by building a program that depends on a local library as
well as a protobuf definition.
Diffstat (limited to 'tools/gotest/main.go')
-rw-r--r--tools/gotest/main.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/gotest/main.go b/tools/gotest/main.go
new file mode 100644
index 000000000000..99218c077617
--- /dev/null
+++ b/tools/gotest/main.go
@@ -0,0 +1,16 @@
+// This program just exists to import some libraries and demonstrate
+// that the build works, it doesn't do anything useful.
+package main
+
+import (
+	"fmt"
+	"somelib"
+	"someproto"
+)
+
+func main() {
+	p := someproto.Person{
+		Name: somelib.Name(),
+	}
+	fmt.Println(somelib.Greet(fmt.Sprintf("%v", p)))
+}