code: func DefaultAttachFunc(o *AttachOptions, containerToAttach *corev1.Container, raw bool, sizeQueue remotecommand.TerminalSizeQueue) func() error {
  	return func() error {
  		restClient, err := restclient.RESTClientFor(o.Config)
  		if err != nil {
  			return err
  		}
  		req := restClient.Post().
  			Resource("pods").
  			Name(o.Pod.Name).
  			Namespace(o.Pod.Namespace).
  			SubResource("attach")
  		req.VersionedParams(&corev1.PodAttachOptions{
  			Container: containerToAttach.Name,
  			Stdin:     o.Stdin,
  			Stdout:    o.Out != nil,
  			Stderr:    !o.DisableStderr,
  			TTY:       raw,
  		}, scheme.ParameterCodec)
  
  		return o.Attach.Attach("POST", req.URL(), o.Config, o.In, o.Out, o.ErrOut, raw, sizeQueue)
  	}
  }
docs: // DefaultAttachFunc is the default AttachFunc used