Skip to content

Commit

Permalink
Merge pull request #41 from gengo/update-grpc
Browse files Browse the repository at this point in the history
Follow changes in protoc-gen-go and grpc-go
  • Loading branch information
yugui committed Aug 17, 2015
2 parents f47879f + 1d701d0 commit af8c8e0
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 13 deletions.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# This is a Makefile which maintains files automatically generated but to be
# shipped together with other files.
# You don't have to rebuild these targets by yourself unless you develop
# grpc-gateway itself.

PKG=github.com/gengo/grpc-gateway
GO_PLUGIN=bin/protoc-gen-go
GO_PLUGIN_PKG=github.com/golang/protobuf/protoc-gen-go
Expand Down Expand Up @@ -55,9 +60,11 @@ test: examples
go test $(PKG)/...

clean distclean:
realclean:
rm -f $(GATEWAY_PLUGIN)
realclean: distclean
rm -f $(OPTIONS_GO)
rm -f $(EXAMPLE_SVCSRCS) $(EXAMPLE_DEPSRCS)
rm -f $(EXAMPLE_GWSRCS)
rm -f $(GO_PLUGIN)

.PHONY: generate examples test clean distclean realclean
8 changes: 4 additions & 4 deletions examples/examplepb/a_bit_of_everything.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions examples/examplepb/echo_service.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions runtime/context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package runtime_test

import (
"net/http"
"reflect"
"testing"

"github.com/gengo/grpc-gateway/runtime"
Expand All @@ -25,10 +26,10 @@ func TestAnnotateContext(t *testing.T) {
if !ok || len(md) != 2 {
t.Errorf("Expected 2 metadata items in context; got %v", md)
}
if md["Foobar"] != "Value1" {
t.Errorf("md[\"Foobar\"] = %v; want %v", md["Foobar"], "Value1")
if got, want := md["Foobar"], []string{"Value1"}; !reflect.DeepEqual(got, want) {
t.Errorf("md[\"Foobar\"] = %v; want %v", got, want)
}
if md["Foo-Baz"] != "Value2" {
t.Errorf("md[\"Foo-Baz\"] = %v want %v", md["Foo-Baz"], "Value2")
if got, want := md["Foo-Baz"], []string{"Value2"}; !reflect.DeepEqual(got, want) {
t.Errorf("md[\"Foo-Baz\"] = %v want %v", got, want)
}
}

0 comments on commit af8c8e0

Please sign in to comment.