diff --git a/README.md b/README.md index 920b634b..161ea28b 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ $ mkdir -p $GOPATH/src/github.com/myusername/project && cd "$_" ```sh $ govendor init -$ govendor fetch github.com/gin-gonic/gin@v1.2 +$ govendor fetch github.com/gin-gonic/gin@v1.3 ``` 4. Copy a starting template inside your project diff --git a/context_test.go b/context_test.go index f36c82f4..68433e97 100644 --- a/context_test.go +++ b/context_test.go @@ -18,8 +18,6 @@ import ( "testing" "time" - "io" - "github.com/gin-contrib/sse" "github.com/gin-gonic/gin/binding" "github.com/golang/protobuf/proto" @@ -967,19 +965,34 @@ func TestContextRenderProtoBuf(t *testing.T) { c, _ := CreateTestContext(w) reps := []int64{int64(1), int64(2)} +<<<<<<< HEAD data := &testdata.Test{ label: "test", reps: resp, +======= + label := "test" + data := &testdata.Test{ + Label: &label, + Reps: reps, +>>>>>>> 4624389... add protobuf render test } c.ProtoBuf(201, data) +<<<<<<< HEAD data, err := proto.Marshal(test) assert.NoError(t, err) assert.Equal(t, 201, w.Code) assert.Equal(t, data, w.Body.String()) +======= + protoData, err := proto.Marshal(data) + assert.NoError(t, err) + + assert.Equal(t, 201, w.Code) + assert.Equal(t, string(protoData[:]), w.Body.String()) +>>>>>>> 4624389... add protobuf render test assert.Equal(t, "application/x-protobuf", w.HeaderMap.Get("Content-Type")) }