Skip to content

yaegi doesn't like filetree FilterFunc #1192

@rcoreilly

Description

@rcoreilly

Describe the bug

per #1191 adding FilterFunc, the docs showing how to use this function crashes in yaegi.

How to reproduce

uncomment the code below in docs/other/file-trees.md

Example code

You can filter which files or directories are shown:


ft := filetree.NewTree(b)
ft.FilterFunc = func(path string, info fs.FileInfo) bool {
    return info.IsDir() // only show directories
}
ft.OpenPath(".")

Relevant output

No response

Platform

macOS

Metadata

Metadata

Assignees

Labels

bugSomething isn't working correctlyconfirmedThis bug has been confirmed

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions