WIP: Some refactoring

This commit is contained in:
Nikolai Rodionov
2023-10-12 13:23:50 +02:00
parent 6a7e541b82
commit c67a9c84e4
7 changed files with 127 additions and 79 deletions

View File

@ -5,7 +5,6 @@ import "os"
func CreateWorkdir(path string) (workdir string, err error) {
if len(path) > 0 {
// Create a dir using the path
// It should not be removed after the execution
if err := os.Mkdir(path, 0777); err != nil {
return path, err
}
@ -13,7 +12,6 @@ func CreateWorkdir(path string) (workdir string, err error) {
workdir = path
} else {
// Create a temporary dir
// It should be removed after the execution
workdir, err = os.MkdirTemp("", "shoebill")
if err != nil {
return workdir, err