Skip to content

Commit

Permalink
fixing context use in RPCServer example
Browse files Browse the repository at this point in the history
  • Loading branch information
jprobinson committed Aug 4, 2017
1 parent 3c00572 commit 82a332d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 81 deletions.
7 changes: 4 additions & 3 deletions examples/servers/rpc/service/cats.go
@@ -1,17 +1,18 @@
// +build !go1.7
// +build go1.7

package service

import (
"context"
"net/http"

"golang.org/x/net/context"
ocontext "golang.org/x/net/context"

"github.com/NYTimes/gizmo/examples/nyt"
"github.com/NYTimes/gizmo/server"
)

func (s *RPCService) GetCats(ctx context.Context, r *CatsRequest) (*CatsResponse, error) {
func (s *RPCService) GetCats(ctx ocontext.Context, r *CatsRequest) (*CatsResponse, error) {
var (
err error
res []*nyt.SemanticConceptArticle
Expand Down
35 changes: 0 additions & 35 deletions examples/servers/rpc/service/cats_go17.go

This file was deleted.

2 changes: 0 additions & 2 deletions examples/servers/rpc/service/cats_test.go
@@ -1,5 +1,3 @@
// +build !go1.7

package service

import (
Expand Down
Expand Up @@ -6,12 +6,14 @@ import (
"context"
"net/http"

ocontext "golang.org/x/net/context"

"github.com/NYTimes/gizmo/examples/nyt"
"github.com/NYTimes/gizmo/server"
"github.com/NYTimes/gizmo/web"
)

func (s *RPCService) GetMostPopular(ctx context.Context, r *MostPopularRequest) (*MostPopularResponse, error) {
func (s *RPCService) GetMostPopular(ctx ocontext.Context, r *MostPopularRequest) (*MostPopularResponse, error) {
var (
err error
res []*nyt.MostPopularResult
Expand Down
40 changes: 0 additions & 40 deletions examples/servers/rpc/service/mostpopular_pre_go17.go

This file was deleted.

0 comments on commit 82a332d

Please sign in to comment.