8000 billy.Filesystem does not implement fs.FS · Issue #121 · go-git/go-billy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
billy.Filesystem does not implement fs.FS #121
Open
@pjebs

Description

@pjebs

I'm using github.com/go-git/go-billy/v6 v6.0.0-20250303095825-24047e466509

import "io/fs"
import "github.com/go-git/go-billy/v6/memfs"

memfs := memfs.New()

fs.WalkDir(memfs, ".", func(path string, d fs.DirEntry, err error) error {
		if err != nil {
			panic(err)
		}
		fmt.Println(path)
		return nil
	})

I get this compile-time error:

cannot use memfs (variable of interface type billy.Filesystem) as fs.FS value in argument to fs.WalkDir: billy.Filesystem does not implement fs.FS (wrong type for method Open)
		have Open(string) (billy.File, error)
		want Open(string) (fs.File, error)

More Info: https://bitfieldconsulting.com/posts/filesystems

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0