From fdf43b12d424743f335ca73403a5f82ef24565fc Mon Sep 17 00:00:00 2001 From: Michael Rubin Date: Mon, 23 May 2016 13:57:24 -0700 Subject: [PATCH] Removing unreferenced code github/com/emicklei The code in pkg github.com/emicklei/examples/ is not referenced in kubernetes codebase. Somehow it was mirrored in the vendor directory in a previous PR #25365. This causes problems for godeps which will then include the reference to this code in the Godeps.json file (among other packages that are not in the vendors directory). Removing the directory and its contents fixes the fissue and we believe the current godeps process should prevent it from re-occurring. --- .../examples/msgpack/msgpack_entity.go | 34 ------------------- 1 file changed, 34 deletions(-) delete mode 100644 vendor/github.com/emicklei/go-restful/examples/msgpack/msgpack_entity.go diff --git a/vendor/github.com/emicklei/go-restful/examples/msgpack/msgpack_entity.go b/vendor/github.com/emicklei/go-restful/examples/msgpack/msgpack_entity.go deleted file mode 100644 index 330e45896e4..00000000000 --- a/vendor/github.com/emicklei/go-restful/examples/msgpack/msgpack_entity.go +++ /dev/null @@ -1,34 +0,0 @@ -package restPack - -import ( - restful "github.com/emicklei/go-restful" - "gopkg.in/vmihailenco/msgpack.v2" -) - -const MIME_MSGPACK = "application/x-msgpack" // Accept or Content-Type used in Consumes() and/or Produces() - -// NewEntityAccessorMPack returns a new EntityReaderWriter for accessing MessagePack content. -// This package is not initialized with such an accessor using the MIME_MSGPACK contentType. -func NewEntityAccessorMsgPack() restful.EntityReaderWriter { - return entityMsgPackAccess{} -} - -// entityOctetAccess is a EntityReaderWriter for Octet encoding -type entityMsgPackAccess struct { -} - -// Read unmarshalls the value from byte slice and using msgpack to unmarshal -func (e entityMsgPackAccess) Read(req *restful.Request, v interface{}) error { - return msgpack.NewDecoder(req.Request.Body).Decode(v) -} - -// Write marshals the value to byte slice and set the Content-Type Header. -func (e entityMsgPackAccess) Write(resp *restful.Response, status int, v interface{}) error { - if v == nil { - resp.WriteHeader(status) - // do not write a nil representation - return nil - } - resp.WriteHeader(status) - return msgpack.NewEncoder(resp).Encode(v) -}