Rename Codec and ResourceVersioner to add Default in front, to allow for types of those names

This commit is contained in:
Daniel Smith
2014-09-05 18:47:09 -07:00
parent 828b70abb9
commit 1c2b65788d
29 changed files with 121 additions and 96 deletions

View File

@@ -42,7 +42,7 @@ func convert(obj interface{}) (interface{}, error) {
return obj, nil
}
var codec = runtime.Codec
var codec = runtime.DefaultCodec
func init() {
runtime.AddKnownTypes("", Simple{}, SimpleList{})
@@ -667,7 +667,7 @@ func TestWriteJSONDecodeError(t *testing.T) {
type T struct {
Value string
}
writeJSON(http.StatusOK, runtime.Codec, &T{"Undecodable"}, w)
writeJSON(http.StatusOK, runtime.DefaultCodec, &T{"Undecodable"}, w)
}))
status := expectApiStatus(t, "GET", server.URL, nil, http.StatusInternalServerError)
if status.Reason != api.StatusReasonUnknown {