summaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
Diffstat (limited to 'example')
-rw-r--r--example/Makefile15
-rw-r--r--example/main.go14
2 files changed, 29 insertions, 0 deletions
diff --git a/example/Makefile b/example/Makefile
new file mode 100644
index 0000000..ba930d7
--- /dev/null
+++ b/example/Makefile
@@ -0,0 +1,15 @@
+build:
+ GO111MODULE=off go build
+ ./example
+
+goimports:
+ goimports -w *.go
+
+prep:
+ go get -v -t -u
+
+run:
+ go run *.go
+
+clean:
+ -rm -f example
diff --git a/example/main.go b/example/main.go
new file mode 100644
index 0000000..bbf6729
--- /dev/null
+++ b/example/main.go
@@ -0,0 +1,14 @@
+package main
+
+import (
+ "fmt"
+
+ "go.wit.com/lib/protobuf/gitpb"
+)
+
+func main() {
+ var r *gitpb.Repository
+ r = gitpb.Load("go.wit.com/lib/protobuf/gitpb")
+
+ fmt.Println("repo has branches:", len(r.Branches))
+}