code: func (s *Scheme) ConvertToVersion(in interface{}, outGroupVersionString string) (interface{}, error) {
  	t := reflect.TypeOf(in)
  	if t.Kind() != reflect.Ptr {
  		return nil, fmt.Errorf("only pointer types may be converted: %v", t)
  	}
  	t = t.Elem()
  	if t.Kind() != reflect.Struct {
  		return nil, fmt.Errorf("only pointers to struct types may be converted: %v", t)
  	}
  
  	gvks, ok := s.typeToGVK[t]
  	if !ok {
  		return nil, fmt.Errorf("%v cannot be converted into version %q", t, outGroupVersionString)
  	}
  	outVersion, err := unversioned.ParseGroupVersion(outGroupVersionString)
  	if err != nil {
  		return nil, err
  	}
  	outKind := outVersion.WithKind(gvks[0].Kind)
  
  	inKind, err := s.ObjectKind(in)
  	if err != nil {
  		return nil, err
  	}
  
  	out, err := s.NewObject(outKind)
  	if err != nil {
  		return nil, err
  	}
  
  	flags, meta := s.generateConvertMeta(inKind.GroupVersion(), outVersion, in)
  	if err := s.converter.Convert(in, out, flags, meta); err != nil {
  		return nil, err
  	}
  
  	if err := s.SetVersionAndKind(outVersion.String(), outKind.Kind, out); err != nil {
  		return nil, err
  	}
  
  	return out, nil
  }
docs: // ConvertToVersion attempts to convert an input object to its matching Kind in another
  // version within this scheme. Will return an error if the provided version does not
  // contain the inKind (or a mapping by name defined with AddKnownTypeWithName).