code: func CopyFile(src, dst string) (int64, error) {
  	cleanSrc := filepath.Clean(src)
  	cleanDst := filepath.Clean(dst)
  	if cleanSrc == cleanDst {
  		return 0, nil
  	}
  	sf, err := os.Open(cleanSrc)
  	if err != nil {
  		return 0, err
  	}
  	defer sf.Close()
  	if err := os.Remove(cleanDst); err != nil && !os.IsNotExist(err) {
  		return 0, err
  	}
  	df, err := os.Create(cleanDst)
  	if err != nil {
  		return 0, err
  	}
  	defer df.Close()
  	return io.Copy(df, sf)
  }
docs: // CopyFile copies from src to dst until either EOF is reached
  // on src or an error occurs. It verifies src exists and removes
  // the dst if it exists.