Categories › Software Development › Code search, analysis, refactoring & languages
Expert skill for testable filesystem code in Go with spf13/afero, authored by its creator. Covers injecting afero.Fs, in-memory tests with MemMapFs, layering with ReadOnlyFs, CopyOnWriteFs and BasePathFs, bridging to io/fs, and where MemMapFs differs from a real disk. Use whenever Go code reads, writes, or walks files and must be unit-tested without touching disk, whenever afero, an injected filesystem, or a --dry-run that must not write is mentioned, and when choosing between afero, io/fs with
Not tested by KitScout yet. When our harness runs it, pros, cons and the tasks we tried appear here, with the date and evidence.