mirror of
https://github.com/safing/portbase
synced 2025-09-01 10:09:50 +00:00
Clean up utils package
This commit is contained in:
parent
3672fa9f45
commit
0716a10400
3 changed files with 2 additions and 2 deletions
|
@ -8,7 +8,7 @@ import (
|
|||
|
||||
const isWindows = runtime.GOOS == "windows"
|
||||
|
||||
// EnsureDirectory ensures that the given directoy exists and that is has the given permissions set.
|
||||
// EnsureDirectory ensures that the given directory exists and that is has the given permissions set.
|
||||
// If path is a file, it is deleted and a directory created.
|
||||
// If a directory is created, also all missing directories up to the required one are created with the given permissions.
|
||||
func EnsureDirectory(path string, perm os.FileMode) error {
|
||||
|
|
|
@ -59,7 +59,7 @@ func ExampleDirStructure() {
|
|||
fmt.Println(err)
|
||||
}
|
||||
|
||||
filepath.Walk(basePath, func(path string, info os.FileInfo, err error) error {
|
||||
_ = filepath.Walk(basePath, func(path string, info os.FileInfo, err error) error {
|
||||
if err == nil {
|
||||
dir := strings.TrimPrefix(path, basePath)
|
||||
if dir == "" {
|
||||
|
|
Loading…
Add table
Reference in a new issue