Below you will find a pre-written code template for the function deleteEmptyDirectory. It takes one argument — path, which is a predefined string variable with the name of the directory:
package main
import (
"fmt"
"os"
)
func deleteEmptyDirectory(path string) string {
// Write below one line of code to implement the deleteEmptyDirectory function
return "Directory " + path + " has been successfully deleted!"
}
Write one code line so the program can implement the function to delete empty directories.
Tip: You can use both Remove functions because deleteEmptyDirectory will only be used to delete empty directories!