code: func installSource(src, dst string, edit editFunc) error {
  	return filepath.Walk(src, func(path string, info os.FileInfo, err error) error {
  		if err != nil {
  			return err
  		}
  
  		relpath, err := filepath.Rel(src, path)
  		if err != nil {
  			return fmt.Errorf("failed to get relative path [%s]: %s", path, err)
  		}
  
  		dstpath := filepath.Join(dst, relpath)
  		switch {
  		case info.IsDir():
  			// Make sure the directory exists in the target filesystem.
  			if err := ensureDirectory(dstpath); err != nil {
  				return fmt.Errorf("failed to ensure directory [%s]: %s", dstpath, err)
  			}
  
  		case !info.Mode().IsRegular():
  			// Skip non-regular files.
  			break
  
  		default:
  			// Copy the file from source to destination.
  			if err := copyFile(path, dstpath, relpath, edit); err != nil {
  				return fmt.Errorf("failed to copy file ([%s] => [%s]): %s", path, dstpath, err)
  			}
  		}
  
  		return nil
  	})
  }
docs: // installSource recursively copies an API generator output directory to a
  // package location.