fs: add Data field to Tree for user-attached state
Enables session trees to carry *Session without a separate map. Part of killing Manager — tree IS the session collection.
This commit is contained in:
parent
6a6016c5e0
commit
525da67b31
|
|
@ -25,6 +25,7 @@ type Tree struct {
|
||||||
statFn func([]string, string) (os.FileInfo, error)
|
statFn func([]string, string) (os.FileInfo, error)
|
||||||
readdirFn func([]string, string) ([]os.DirEntry, error)
|
readdirFn func([]string, string) ([]os.DirEntry, error)
|
||||||
children map[string]*Tree
|
children map[string]*Tree
|
||||||
|
Data any // user-attached state
|
||||||
}
|
}
|
||||||
|
|
||||||
// Option configures a Tree.
|
// Option configures a Tree.
|
||||||
|
|
|
||||||
Reference in New Issue