3 ms·
It definitely wouldn't need to be at the top level. Remember, this is an interface, so func (f SomeConcreteFS) WithContext(ctx context.Context) fs.FS coul
by andrewstuart2 6y ago
It definitely wouldn't need to be at the top level. Remember, this is an interface, so
func (f SomeConcreteFS) WithContext(ctx context.Context) fs.FS
could hold a reference to the underlying filesystem and call appropriate read deadlines, timeouts, etc.
- sudhirj 6y agoAnd the draft specifically mentions that those methods are the minimum interface - a library that supports contexts could always do this either way.