Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dummy Filesystem feature #35

Open
lordofscripts opened this issue Sep 5, 2024 · 0 comments
Open

Dummy Filesystem feature #35

lordofscripts opened this issue Sep 5, 2024 · 0 comments

Comments

@lordofscripts
Copy link

Would have been nice if DummyFS also had the capability of, not only doing nothing but instead just printing to console the operation name (Remove, Rename, etc.) and its main parameter. This could be outputted to the console, or log, or via a user-defined callback (more flexible). For example

// An instance of Dummy Filesystem which returns no error instead of error on everything
dummyFS := dummy.Create(nil)
// call dummy filesystem operation
dummyFS.RemoveAll("/usr/share")

Which wouldn't cause an error and instead output this somewhere:

⚡ os.RemoveAll /usr/share/

This would be more useful than for doing dry runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant