Skip to content

Commit a50e0a5

Browse files
ChaturvediSulabhSulabh
authored andcommitted
replace io/fs with os, go mod failing - golang/go#40067 (comment)
1 parent 6294b3d commit a50e0a5

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"
@@ -227,7 +226,7 @@ func TestDefaultAbsPluginHomeWithXdgConfigDirs(t *testing.T) {
227226
var expected = []string{filepath.Join(h, "1", "fakeplugin.so"), filepath.Join(h, "2",
228227
"fakeplugin.so")}
229228
var actual []string
230-
fSys.Walk(h, func(path string, info fs.FileInfo, err error) error {
229+
fSys.Walk(h, func(path string, info os.FileInfo, err error) error {
231230
fmt.Println(h)
232231
if info.Name() == "fakeplugin.so" {
233232
actual = append(actual, path)

0 commit comments

Comments
 (0)