mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-08 20:50:24 +00:00
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:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user