Skip to content

Dummy Filesystem feature #35

Description

@lordofscripts

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions