Allow delete to work from directories, files, multiple resources

Simple refactoring reusing the resource builder changes.
This commit is contained in:
Clayton Coleman
2015-01-03 18:02:39 -05:00
parent d24c5b145e
commit a3ff55e478
3 changed files with 242 additions and 7 deletions

View File

@@ -153,3 +153,7 @@ func NewAPIFactory() (*Factory, *testFactory, runtime.Codec) {
func objBody(codec runtime.Codec, obj runtime.Object) io.ReadCloser {
return ioutil.NopCloser(bytes.NewReader([]byte(runtime.EncodeOrDie(codec, obj))))
}
func stringBody(body string) io.ReadCloser {
return ioutil.NopCloser(bytes.NewReader([]byte(body)))
}