Skip to content

Commit

Permalink
chore: unnecessary code removed
Browse files Browse the repository at this point in the history
  • Loading branch information
RaulCatalinas committed Jul 22, 2024
1 parent f02a68a commit 4bff42f
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions internal/utils/user-os.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,10 @@ func createFile(name string) {
})
}

func CheckinFolderOrFile(path string, folder bool) {
func CheckinFolderOrFile(path string, isFolder bool) {
_, err := os.Stat(path)

if err != nil {
var folderType string

if folder {
folderType = "folder"
} else {
folderType = "file"
}

WriteMessage(WriteMessageProps{
Type: "error",
Message: GetErrorMessage("CheckingFolderOrFile"),
Expand All @@ -52,7 +44,7 @@ func CheckinFolderOrFile(path string, folder bool) {
Message: strings.Replace(errorMessage, "{fileName}", path, -1),
})

if folder {
if isFolder {
createFolder(path)
} else {
createFile(path)
Expand Down

0 comments on commit 4bff42f

Please sign in to comment.