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.
This commit is contained in:
parent
9ea0363e6f
commit
1619f58d78
4 changed files with 63 additions and 0 deletions
16
tools/gotest/main.go
Normal file
16
tools/gotest/main.go
Normal file
|
|
@ -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)))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue