feat: Added initial support for .zip ✨
All checks were successful
CI / build (push) Successful in 2m3s
All checks were successful
CI / build (push) Successful in 2m3s
This commit is contained in:
@@ -4,6 +4,8 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func MoveFile(src, dst string) error {
|
||||
@@ -39,9 +41,18 @@ func MoveFile(src, dst string) error {
|
||||
return fmt.Errorf("chmod error: %s", err)
|
||||
}
|
||||
|
||||
//err = in.Close()
|
||||
//if err != nil {
|
||||
// return fmt.Errorf("closing file failed: %s", err)
|
||||
//}
|
||||
//time.Sleep(time.Second * 10)
|
||||
err = os.Remove(src)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed removing original file: %s", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func FileNameWithoutExt(fileName string) string {
|
||||
return strings.TrimSuffix(fileName, filepath.Ext(fileName))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user