Run formatter

This commit is contained in:
Elara 2023-07-17 06:46:47 -07:00
parent c6fb3e8489
commit bafc40da8a
2 changed files with 7 additions and 7 deletions

View File

@ -108,7 +108,7 @@ func Glob(glob string) ([]string, error) {
// Join splitDir and add filepath separator. This is the directory that will be searched.
dir := filepath.Join(splitDir...)
if filepath.IsAbs(glob) {
dir = string(filepath.Separator) + dir
}

View File

@ -39,17 +39,17 @@ func TestCompileGlob(t *testing.T) {
}
func TestGlob(t *testing.T) {
err := os.MkdirAll("pcretest/dir1", 0755)
err := os.MkdirAll("pcretest/dir1", 0o755)
if err != nil {
t.Fatal(err)
}
err = os.MkdirAll("pcretest/dir2", 0755)
err = os.MkdirAll("pcretest/dir2", 0o755)
if err != nil {
t.Fatal(err)
}
err = os.MkdirAll("pcretest/test1/dir4", 0755)
err = os.MkdirAll("pcretest/test1/dir4", 0o755)
if err != nil {
t.Fatal(err)
}
@ -58,7 +58,7 @@ func TestGlob(t *testing.T) {
if err != nil {
t.Fatal(err)
}
err = touch("pcretest/file2")
if err != nil {
t.Fatal(err)
@ -113,9 +113,9 @@ func TestGlob(t *testing.T) {
}
func touch(path string) error {
fl, err := os.OpenFile(path, os.O_CREATE, 0644)
fl, err := os.OpenFile(path, os.O_CREATE, 0o644)
if err != nil {
return err
}
return fl.Close()
}
}