Skip to content

Commit bb833a8

Browse files
replace io/fs with os, go mod failing - golang/go#40067 (comment)
1 parent 9c6bb58 commit bb833a8

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

api/konfig/plugins.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
package konfig
55

66
import (
7-
"io/fs"
87
"os"
98
"path/filepath"
109
"runtime"
@@ -169,7 +168,7 @@ func mergeMultipleConfigDirsToOne(dirs []string, fSys filesys.FileSystem) string
169168
for _, root := range dirs {
170169
root = filepath.Join(root, ProgramName, RelPluginHome)
171170
if fSys.Exists(root) {
172-
fSys.Walk(root, func(path string, info fs.FileInfo, err error) error {
171+
fSys.Walk(root, func(path string, info os.FileInfo, err error) error {
173172
if !info.IsDir() {
174173
idx := strings.Index(path, "plugin")
175174
trimPath := path[idx:]

api/konfig/plugins_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ package konfig
55

66
import (
77
"fmt"
8-
"io/fs"
98
"os"
109
"path/filepath"
1110
"strconv"
@@ -217,7 +216,7 @@ func TestDefaultAbsPluginHomeWithXdgConfigDirs(t *testing.T) {
217216
var expected = []string{filepath.Join(h, "1", "fakeplugin.so"), filepath.Join(h, "2",
218217
"fakeplugin.so")}
219218
var actual []string
220-
fSys.Walk(h, func(path string, info fs.FileInfo, err error) error {
219+
fSys.Walk(h, func(path string, info os.FileInfo, err error) error {
221220
fmt.Println(h)
222221
if info.Name() == "fakeplugin.so" {
223222
actual = append(actual, path)

0 commit comments

Comments
 (0)