docs: added docstrings

This commit is contained in:
Bryan Bailey
2024-08-26 22:59:37 -04:00
parent e8bd6e4179
commit b3e99092fc
5 changed files with 55 additions and 104 deletions

View File

@@ -6,6 +6,11 @@ import (
"strings"
)
// Cleanup removes unnecessary files from the comic directory.
//
// It walks through the directory and deletes files with .jpg, .jpeg, or .png extensions that do not start with "001".
// No parameters.
// Returns an error if the operation fails.
func (c *Comic) Cleanup() error {
filepath.Walk(
filepath.Join(c.LibraryPath, c.Title),