From ab83ad2e4b64d17057eb264afd59737e7da57f1e Mon Sep 17 00:00:00 2001 From: Muhammed Uluyol Date: Mon, 27 Jul 2015 16:47:41 -0700 Subject: [PATCH] Update documentation for deep copy functions --- pkg/conversion/cloner.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/conversion/cloner.go b/pkg/conversion/cloner.go index 3afafef05d1..6f759900fb5 100644 --- a/pkg/conversion/cloner.go +++ b/pkg/conversion/cloner.go @@ -84,14 +84,14 @@ func verifyDeepCopyFunctionSignature(ft reflect.Type) error { } // RegisterGeneratedDeepCopyFunc registers a copying func with the Cloner. -// deepCopyFunc must take two parameters: a type and a pointer to Cloner -// and return an element of the same type and an error. +// deepCopyFunc must take three parameters: a type input, a pointer to a +// type output, and a pointer to Cloner. It should return an error. // // Example: // c.RegisterGeneratedDeepCopyFunc( -// func(in Pod, c *Cloner) (Pod, error) { +// func(in Pod, out *Pod, c *Cloner) error { // // deep copy logic... -// return copy, nil +// return nil // }) func (c *Cloner) RegisterDeepCopyFunc(deepCopyFunc interface{}) error { fv := reflect.ValueOf(deepCopyFunc)