code: func (s *Scheme) AddKnownTypeWithName(gvk schema.GroupVersionKind, obj Object) {
  	s.addObservedVersion(gvk.GroupVersion())
  	t := reflect.TypeOf(obj)
  	if len(gvk.Version) == 0 {
  		panic(fmt.Sprintf("version is required on all types: %s %v", gvk, t))
  	}
  	if t.Kind() != reflect.Ptr {
  		panic("All types must be pointers to structs.")
  	}
  	t = t.Elem()
  	if t.Kind() != reflect.Struct {
  		panic("All types must be pointers to structs.")
  	}
  
  	if oldT, found := s.gvkToType[gvk]; found && oldT != t {
  		panic(fmt.Sprintf("Double registration of different types for %v: old=%v.%v, new=%v.%v in scheme %q", gvk, oldT.PkgPath(), oldT.Name(), t.PkgPath(), t.Name(), s.schemeName))
  	}
  
  	s.gvkToType[gvk] = t
  
  	for _, existingGvk := range s.typeToGVK[t] {
  		if existingGvk == gvk {
  			return
  		}
  	}
  	s.typeToGVK[t] = append(s.typeToGVK[t], gvk)
  }
docs: // AddKnownTypeWithName is like AddKnownTypes, but it lets you specify what this type should
  // be encoded as. Useful for testing when you don't want to make multiple packages to define
  // your structs. Version may not be empty - use the APIVersionInternal constant if you have a
  // type that does not have a formal version.