code: func UpdateObject(info *resource.Info, codec runtime.Codec, updateFn func(runtime.Object) error) (runtime.Object, error) {
  	helper := resource.NewHelper(info.Client, info.Mapping)
  
  	if err := updateFn(info.Object); err != nil {
  		return nil, err
  	}
  
  	// Update the annotation used by kubectl apply
  	if err := kubectl.UpdateApplyAnnotation(info, codec); err != nil {
  		return nil, err
  	}
  
  	if _, err := helper.Replace(info.Namespace, info.Name, true, info.Object); err != nil {
  		return nil, err
  	}
  
  	return info.Object, nil
  }
docs: // UpdateObject updates resource object with updateFn