code: func Copypath(dst string, src string, tests, all bool) error {
  	err := filepath.Walk(src, func(path string, info os.FileInfo, err error) error {
  		if err != nil {
  			return err
  		}
  
  		skip := ShouldSkip(path, info, tests, all)
  
  		if skip {
  			if info.IsDir() {
  				return filepath.SkipDir
  			}
  			return nil
  		}
  
  		if info.IsDir() {
  			return nil
  		}
  
  		dst := filepath.Join(dst, path[len(src):])
  
  		if info.Mode()&os.ModeSymlink != 0 {
  			return Copylink(dst, path)
  		}
  
  		return Copyfile(dst, path)
  	})
  	if err != nil {
  		// if there was an error during copying, remove the partial copy.
  		RemoveAll(dst)
  	}
  	return err
  }
docs: // Copypath copies the contents of src to dst, excluding any file that is not
  // relevant to the Go compiler.