You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ideally os.DirFS would have been a type rather than a function, but it seems its now too late for that. so I would propose adding a type that implements the same items as the return value from os.DirFS. this would also make discovery simpler, because the methods would be on the package site, rather than just in the notes of the DirFS function. I dont care what name is used, I just chose Directory to have something.
The text was updated successfully, but these errors were encountered:
I dont get why you think its OK to just close issues like this without any discussion. the suggested option is not the same experience. it requires an extra import, and its a function rather than a method:
os.DirFS
implementsio/fs.ReadFileFS
, but returns the interfaceio/fs.FS
, which means you need a type assertion to make use of it:if we just had some concrete type that implemented the interfaces, it would remove the need for a type assertion:
ideally
os.DirFS
would have been a type rather than a function, but it seems its now too late for that. so I would propose adding a type that implements the same items as the return value fromos.DirFS
. this would also make discovery simpler, because the methods would be on the package site, rather than just in the notes of theDirFS
function. I dont care what name is used, I just choseDirectory
to have something.The text was updated successfully, but these errors were encountered: