How orlandorode97/gofilter works
Project type and purpose
• This is a standalone Go-based CLI application (“go-filter”) whose primary job is to load an image file, apply one of several built-in filter effects (grayscale, sepia, mirror, etc.), and write out the transformed image.
File structure
• Top-level:
• go.mod / go.sum – Go module definitions
• Makefile / .gitignore – build and VCS ignores
• cmd/go-filter/ – the only “service”/binary in the repo
• Under cmd/go-filter/:
• main.go – application entry point, sets up the root CLI command
• filter.go + filter_os.go – command registration, shared flags (e.g. --output)
• helper.go – I/O and common helper functions (readImage, writeImage, error handling)
• .go – subcommand to list available filters
• [grey_tone.go, negative_tone.go, red.go, blue.go, green.go, sepia_tone.go, mirror.go, sketch.go, shaperning.go, blur.go] – one filter implementation per file, each applying its own algorithm.
README for additional insights
• The README describes the CLI hierarchy:
• root command: go-filter
• subcommand: filter
– flags: --output
– subcommands: list, gray, negative, red, blue, …
• Usage examples and a TODO section hint at a future refactoring towards interfaces (Strategy/Command patterns) and concurrency for filter performance.