+4
Diff
round #0
+4
hook/setup.go
+4
hook/setup.go
···
5
5
import (
6
6
"errors"
7
7
"fmt"
8
+
"io/fs"
8
9
"os"
9
10
"path/filepath"
10
11
"strings"
···
54
55
func Setup(config config) error {
55
56
// iterate over all directories in current directory:
56
57
repoDirs, err := os.ReadDir(config.scanPath)
58
+
if errors.Is(err, fs.ErrNotExist) {
59
+
return os.MkdirAll(config.scanPath, 0755)
60
+
}
57
61
if err != nil {
58
62
return err
59
63
}