code: func (ftp *FTP) Upload(localPath string) (err error) {
  	fInfo, err := os.Stat(localPath)
  	if err != nil {
  		return err
  	}
  
  	switch {
  	case fInfo.IsDir():
  		return ftp.copyDir(localPath)
  	case fInfo.Mode()&os.ModeType == 0:
  		return ftp.copyFile(localPath, filepath.Base(localPath))
  	default:
  		// Ignore other special files
  	}
  
  	return nil
  }
docs: // Upload a file, or recursively upload a directory.
  // Only normal files and directories are uploaded.
  // Symlinks are not kept but treated as normal files/directories if targets are so.