TBR: playground: Fix go build and vdl after moving client.
Change-Id: I17091cc23559cd934693a8ac9ead17f5d23e5f56
diff --git a/client/content/playgrounds/code/fortune/ex0-go/src/client/client.go b/client/content/playgrounds/code/fortune/ex0-go/src/client/client.go
index 140e270..1ad7cbc 100644
--- a/client/content/playgrounds/code/fortune/ex0-go/src/client/client.go
+++ b/client/content/playgrounds/code/fortune/ex0-go/src/client/client.go
@@ -1,3 +1,5 @@
+// +build OMIT
+
// index=3
package main
diff --git a/client/content/playgrounds/code/fortune/ex0-go/src/fortune/fortune.vdl.go b/client/content/playgrounds/code/fortune/ex0-go/src/fortune/fortune.vdl.go
new file mode 100644
index 0000000..70c1b11
--- /dev/null
+++ b/client/content/playgrounds/code/fortune/ex0-go/src/fortune/fortune.vdl.go
@@ -0,0 +1,161 @@
+// This file was auto-generated by the veyron vdl tool.
+// Source: fortune.vdl
+
+// index=3
+package fortune
+
+import (
+ // The non-user imports are prefixed with "__" to prevent collisions.
+ __veyron2 "v.io/core/veyron2"
+ __context "v.io/core/veyron2/context"
+ __ipc "v.io/core/veyron2/ipc"
+)
+
+// FortuneClientMethods is the client interface
+// containing Fortune methods.
+type FortuneClientMethods interface {
+ // Returns a random fortune.
+ Get(*__context.T, ...__ipc.CallOpt) (Fortune string, err error)
+ // Adds a fortune to the set used by Get().
+ Add(ctx *__context.T, Fortune string, opts ...__ipc.CallOpt) error
+}
+
+// FortuneClientStub adds universal methods to FortuneClientMethods.
+type FortuneClientStub interface {
+ FortuneClientMethods
+ __ipc.UniversalServiceMethods
+}
+
+// FortuneClient returns a client stub for Fortune.
+func FortuneClient(name string, opts ...__ipc.BindOpt) FortuneClientStub {
+ var client __ipc.Client
+ for _, opt := range opts {
+ if clientOpt, ok := opt.(__ipc.Client); ok {
+ client = clientOpt
+ }
+ }
+ return implFortuneClientStub{name, client}
+}
+
+type implFortuneClientStub struct {
+ name string
+ client __ipc.Client
+}
+
+func (c implFortuneClientStub) c(ctx *__context.T) __ipc.Client {
+ if c.client != nil {
+ return c.client
+ }
+ return __veyron2.GetClient(ctx)
+}
+
+func (c implFortuneClientStub) Get(ctx *__context.T, opts ...__ipc.CallOpt) (o0 string, err error) {
+ var call __ipc.Call
+ if call, err = c.c(ctx).StartCall(ctx, c.name, "Get", nil, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&o0, &err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+func (c implFortuneClientStub) Add(ctx *__context.T, i0 string, opts ...__ipc.CallOpt) (err error) {
+ var call __ipc.Call
+ if call, err = c.c(ctx).StartCall(ctx, c.name, "Add", []interface{}{i0}, opts...); err != nil {
+ return
+ }
+ if ierr := call.Finish(&err); ierr != nil {
+ err = ierr
+ }
+ return
+}
+
+// FortuneServerMethods is the interface a server writer
+// implements for Fortune.
+type FortuneServerMethods interface {
+ // Returns a random fortune.
+ Get(__ipc.ServerContext) (Fortune string, err error)
+ // Adds a fortune to the set used by Get().
+ Add(ctx __ipc.ServerContext, Fortune string) error
+}
+
+// FortuneServerStubMethods is the server interface containing
+// Fortune methods, as expected by ipc.Server.
+// There is no difference between this interface and FortuneServerMethods
+// since there are no streaming methods.
+type FortuneServerStubMethods FortuneServerMethods
+
+// FortuneServerStub adds universal methods to FortuneServerStubMethods.
+type FortuneServerStub interface {
+ FortuneServerStubMethods
+ // Describe the Fortune interfaces.
+ Describe__() []__ipc.InterfaceDesc
+}
+
+// FortuneServer returns a server stub for Fortune.
+// It converts an implementation of FortuneServerMethods into
+// an object that may be used by ipc.Server.
+func FortuneServer(impl FortuneServerMethods) FortuneServerStub {
+ stub := implFortuneServerStub{
+ impl: impl,
+ }
+ // Initialize GlobState; always check the stub itself first, to handle the
+ // case where the user has the Glob method defined in their VDL source.
+ if gs := __ipc.NewGlobState(stub); gs != nil {
+ stub.gs = gs
+ } else if gs := __ipc.NewGlobState(impl); gs != nil {
+ stub.gs = gs
+ }
+ return stub
+}
+
+type implFortuneServerStub struct {
+ impl FortuneServerMethods
+ gs *__ipc.GlobState
+}
+
+func (s implFortuneServerStub) Get(ctx __ipc.ServerContext) (string, error) {
+ return s.impl.Get(ctx)
+}
+
+func (s implFortuneServerStub) Add(ctx __ipc.ServerContext, i0 string) error {
+ return s.impl.Add(ctx, i0)
+}
+
+func (s implFortuneServerStub) Globber() *__ipc.GlobState {
+ return s.gs
+}
+
+func (s implFortuneServerStub) Describe__() []__ipc.InterfaceDesc {
+ return []__ipc.InterfaceDesc{FortuneDesc}
+}
+
+// FortuneDesc describes the Fortune interface.
+var FortuneDesc __ipc.InterfaceDesc = descFortune
+
+// descFortune hides the desc to keep godoc clean.
+var descFortune = __ipc.InterfaceDesc{
+ Name: "Fortune",
+ PkgPath: "v.io/playground/client/content/playgrounds/code/fortune/ex0-go/src/fortune",
+ Methods: []__ipc.MethodDesc{
+ {
+ Name: "Get",
+ Doc: "// Returns a random fortune.",
+ OutArgs: []__ipc.ArgDesc{
+ {"Fortune", ``}, // string
+ {"err", ``}, // error
+ },
+ },
+ {
+ Name: "Add",
+ Doc: "// Adds a fortune to the set used by Get().",
+ InArgs: []__ipc.ArgDesc{
+ {"Fortune", ``}, // string
+ },
+ OutArgs: []__ipc.ArgDesc{
+ {"", ``}, // error
+ },
+ },
+ },
+}
diff --git a/client/content/playgrounds/code/fortune/ex0-go/src/server/server.go b/client/content/playgrounds/code/fortune/ex0-go/src/server/server.go
index 3b0966e..5a3d14a 100644
--- a/client/content/playgrounds/code/fortune/ex0-go/src/server/server.go
+++ b/client/content/playgrounds/code/fortune/ex0-go/src/server/server.go
@@ -1,3 +1,5 @@
+// +build OMIT
+
// index=1
package main
diff --git a/testdata/src/ping/ping.go b/testdata/src/ping/ping.go
index 368516d..ea8573e 100644
--- a/testdata/src/ping/ping.go
+++ b/testdata/src/ping/ping.go
@@ -1,4 +1,5 @@
// +build OMIT
+
package main
import (
diff --git a/testdata/src/pong/pong.go b/testdata/src/pong/pong.go
index 6336f7f..d287e32 100644
--- a/testdata/src/pong/pong.go
+++ b/testdata/src/pong/pong.go
@@ -1,4 +1,5 @@
// +build OMIT
+
package main
import (