1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-04 12:52:28 +08:00

refactor: update param name CopyFile

This commit is contained in:
dudaodong
2023-04-25 10:49:12 +08:00
parent 62891f20f8
commit fa81ee143e
3 changed files with 5 additions and 5 deletions

View File

@@ -69,14 +69,14 @@ func RemoveFile(path string) error {
// CopyFile copy src file to dest file.
// Play: https://go.dev/play/p/Jg9AMJMLrJi
func CopyFile(srcFilePath string, dstFilePath string) error {
srcFile, err := os.Open(srcFilePath)
func CopyFile(srcPath string, dstPath string) error {
srcFile, err := os.Open(srcPath)
if err != nil {
return err
}
defer srcFile.Close()
distFile, err := os.Create(dstFilePath)
distFile, err := os.Create(dstPath)
if err != nil {
return err
}