Skip to content

Commit

Permalink
replace io/fs with os, go mod failing - golang/go#40067 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaturvediSulabh authored and Sulabh committed Jun 8, 2021
1 parent 6294b3d commit a50e0a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions api/konfig/plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
package konfig

import (
"io/fs"
"os"
"path/filepath"
"runtime"
Expand Down Expand Up @@ -169,7 +168,7 @@ func mergeMultipleConfigDirsToOne(dirs []string, fSys filesys.FileSystem) string
for _, root := range dirs {
root = filepath.Join(root, ProgramName, RelPluginHome)
if fSys.Exists(root) {
fSys.Walk(root, func(path string, info fs.FileInfo, err error) error {
fSys.Walk(root, func(path string, info os.FileInfo, err error) error {
if !info.IsDir() {
idx := strings.Index(path, "plugin")
trimPath := path[idx:]
Expand Down
3 changes: 1 addition & 2 deletions api/konfig/plugins_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package konfig

import (
"fmt"
"io/fs"
"os"
"path/filepath"
"strconv"
Expand Down Expand Up @@ -227,7 +226,7 @@ func TestDefaultAbsPluginHomeWithXdgConfigDirs(t *testing.T) {
var expected = []string{filepath.Join(h, "1", "fakeplugin.so"), filepath.Join(h, "2",
"fakeplugin.so")}
var actual []string
fSys.Walk(h, func(path string, info fs.FileInfo, err error) error {
fSys.Walk(h, func(path string, info os.FileInfo, err error) error {
fmt.Println(h)
if info.Name() == "fakeplugin.so" {
actual = append(actual, path)
Expand Down

0 comments on commit a50e0a5

Please sign in to comment.