Add a List type that can contain arbitrary objects

Supports objects that the core schema may not recognize and
preserves them unmodified as runtime.Unknown
This commit is contained in:
Clayton Coleman
2014-12-07 21:19:10 -05:00
parent db2c59ff61
commit 8a833ca701
11 changed files with 109 additions and 4 deletions

View File

@@ -366,6 +366,8 @@ func (s *Scheme) DecodeInto(data []byte, obj Object) error {
// Copy does a deep copy of an API object. Useful mostly for tests.
// TODO(dbsmith): implement directly instead of via Encode/Decode
// TODO(claytonc): Copy cannot be used for objects which do not encode type information, such
// as lists of runtime.Objects
func (s *Scheme) Copy(obj Object) (Object, error) {
data, err := s.EncodeToVersion(obj, "")
if err != nil {