Merge "playground: Move context.T out of rpc.ServerCall."
diff --git a/client/bundles/fortune/src/server/server.go b/client/bundles/fortune/src/server/server.go
index a7a204f..c90235d 100644
--- a/client/bundles/fortune/src/server/server.go
+++ b/client/bundles/fortune/src/server/server.go
@@ -12,6 +12,7 @@
"math/rand"
"v.io/v23"
+ "v.io/v23/context"
"v.io/v23/rpc"
"v.io/x/lib/vlog"
"v.io/x/ref/lib/security/securityflag"
@@ -43,13 +44,13 @@
}
// Methods that get called by RPC requests.
-func (f *fortuned) GetRandomFortune(rpc.ServerCall) (Fortune string, err error) {
+func (f *fortuned) GetRandomFortune(*context.T, rpc.ServerCall) (Fortune string, err error) {
Fortune = f.fortunes[f.random.Intn(len(f.fortunes))]
fmt.Printf("Serving: %s\n", Fortune)
return Fortune, nil
}
-func (f *fortuned) AddNewFortune(_ rpc.ServerCall, Fortune string) error {
+func (f *fortuned) AddNewFortune(_ *context.T, _ rpc.ServerCall, Fortune string) error {
fmt.Printf("Adding: %s\n", Fortune)
f.fortunes = append(f.fortunes, Fortune)
return nil
diff --git a/go/src/v.io/x/playground/compilerd/jobqueue/jobqueue_test.go b/go/src/v.io/x/playground/compilerd/jobqueue/jobqueue_test.go
index 7c882f5..0a17ab5 100644
--- a/go/src/v.io/x/playground/compilerd/jobqueue/jobqueue_test.go
+++ b/go/src/v.io/x/playground/compilerd/jobqueue/jobqueue_test.go
@@ -30,7 +30,7 @@
pgDir := os.ExpandEnv("${V23_ROOT}/release/projects/playground/go")
cmd := exec.Command("make", "builder")
- cmd.Dir = path.Join(pgDir, "src", "playground")
+ cmd.Dir = path.Join(pgDir, "src", "v.io", "x", "playground")
if out, err := cmd.CombinedOutput(); err != nil {
fmt.Println("Error running 'make builder'")
fmt.Println(string(out))
diff --git a/go/src/v.io/x/playground/testdata/src/pong/pong.go b/go/src/v.io/x/playground/testdata/src/pong/pong.go
index 298fbc4..6e171ab 100644
--- a/go/src/v.io/x/playground/testdata/src/pong/pong.go
+++ b/go/src/v.io/x/playground/testdata/src/pong/pong.go
@@ -10,6 +10,7 @@
"fmt"
"v.io/v23"
+ "v.io/v23/context"
"v.io/v23/rpc"
"v.io/v23/security"
"v.io/x/lib/vlog"
@@ -21,8 +22,8 @@
type pongd struct{}
-func (f *pongd) Ping(call rpc.ServerCall, message string) (result string, err error) {
- remote, _ := security.RemoteBlessingNames(call.Context())
+func (f *pongd) Ping(ctx *context.T, _ rpc.ServerCall, message string) (result string, err error) {
+ remote, _ := security.RemoteBlessingNames(ctx)
fmt.Printf("%v: %q\n", remote, message)
return "PONG", nil
}