https://github.com/mac-cleanup/plugin-template
Plugin Template for MacCleanup
https://github.com/mac-cleanup/plugin-template
mac-cleanup macos
Last synced: 3 months ago
JSON representation
Plugin Template for MacCleanup
- Host: GitHub
- URL: https://github.com/mac-cleanup/plugin-template
- Owner: mac-cleanup
- License: mit
- Created: 2021-08-17T17:28:20.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-08-18T07:22:47.000Z (almost 5 years ago)
- Last Synced: 2025-11-20T12:08:56.370Z (9 months ago)
- Topics: mac-cleanup, macos
- Language: Go
- Homepage:
- Size: 19.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Plugin Template
A plugin-template for MacCleanup.
## Usage
In order to create your own plugin you'll just need to use this template to create a new repository.
## Documentation
Use The `DeleteFiles` method within the `src/plugin.go` file like so:
```go
func (g plugin) Cleanup() {
...
DeleteFiles("~/DIR_YOU_WANT_TO_BE_CLEANED") // DIR_YOU_WANT_TO_BE_CLEANED is the path to the directory you want to be cleaned
...
// Add more here
}
```
## Compile your plugin
To compile your plugin locally simply run:
```bash
go build -buildmode=plugin -o dist/plugin.so src/plugin.go
```
You now have your `plugin.so` file within the `dist` directory.
To use your plugin just copy your `plugin.so` file into `~/.mac-cleanup/plugins/YOUR_PLUGIN/`.
Run `mac-cleanup clean` to make use of any plugins in this directory.
## Contributing
Contributions are always welcome!
Please adhere to this project's `code of conduct`.
## License
This project is licensed under the [MIT](https://choosealicense.com/licenses/mit/) license.
## Authors
- [@fwartner](https://www.github.com/fwartner)