code: func (g *genConversion) generateFor(inType, outType *types.Type, sw *generator.SnippetWriter) {
  	klog.V(5).Infof("generating %v -> %v", inType, outType)
  	var f func(*types.Type, *types.Type, *generator.SnippetWriter)
  
  	switch inType.Kind {
  	case types.Builtin:
  		f = g.doBuiltin
  	case types.Map:
  		f = g.doMap
  	case types.Slice:
  		f = g.doSlice
  	case types.Struct:
  		f = g.doStruct
  	case types.Pointer:
  		f = g.doPointer
  	case types.Alias:
  		f = g.doAlias
  	default:
  		f = g.doUnknown
  	}
  
  	f(inType, outType, sw)
  }
docs: // we use the system of shadowing 'in' and 'out' so that the same code is valid
  // at any nesting level. This makes the autogenerator easy to understand, and
  // the compiler shouldn't care.