Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow changes in protoc-gen-go and grpc-go #41

Merged
merged 3 commits into from
Aug 17, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
}
}