{"id":36704277,"url":"https://github.com/cekrem/go-transform","last_synced_at":"2026-01-12T11:41:12.036Z","repository":{"id":271391175,"uuid":"913274200","full_name":"cekrem/go-transform","owner":"cekrem","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-13T11:35:34.000Z","size":12,"stargazers_count":18,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-13T12:32:17.808Z","etag":null,"topics":["dependency-inversion-principle","go","golang","plugins"],"latest_commit_sha":null,"homepage":"https://cekrem.github.io/posts/clean-architecture-and-plugins-in-go/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cekrem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-07T11:14:48.000Z","updated_at":"2025-02-13T11:35:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"6236aea0-889a-4a2e-a4a5-5f18f58f9388","html_url":"https://github.com/cekrem/go-transform","commit_stats":null,"previous_names":["cekrem/go-transform"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cekrem/go-transform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cekrem%2Fgo-transform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cekrem%2Fgo-transform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cekrem%2Fgo-transform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cekrem%2Fgo-transform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cekrem","download_url":"https://codeload.github.com/cekrem/go-transform/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cekrem%2Fgo-transform/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338972,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T10:58:46.209Z","status":"ssl_error","status_checked_at":"2026-01-12T10:58:42.742Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dependency-inversion-principle","go","golang","plugins"],"created_at":"2026-01-12T11:41:11.397Z","updated_at":"2026-01-12T11:41:12.031Z","avatar_url":"https://github.com/cekrem.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-transform\n\nA flexible Go-based text transformation tool that uses a plugin architecture to process input streams. This project demonstrates the Dependency Inversion Principle with three distinct layers, emphasizing modularity through its plugin system.\n\nI wrote about an earlier version of this project [on my blog](https://cekrem.github.io/posts/clean-architecture-and-plugins-in-go/), check it out for more context.\n\n## Features\n\n- Plugin-based architecture for extensible text transformations\n- Clean separation of concerns following Clean Architecture principles\n- Simple CLI interface\n\n## Prerequisites\n\n- Go 1.23 or later\n- Make\n\n## Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/cekrem/go-transform.git\ncd go-transform\n\n# Build the main application and plugins\nmake\n```\n\n## Usage\n\nThe tool reads from standard input and writes to standard output:\n\n```bash\n# Using the default passthrough transformer\necho \"Hello, World!\" | ./build/transform\n\n# Using a specific transformer\necho \"Hello, World!\" | ./build/transform -transformer=passthrough\n```\n\n## Project Structure\n\n```\n.\n├── cmd/                 # Application entrypoint\n├── pkg/\n│   └── domain/         # Core business rules and interfaces\n├── internal/\n│   └── app/           # Application logic\n│       └── processor/ # Transformation orchestration\n└── plugins/           # Infrastructure implementations (plugins)\n```\n\n## Architecture\n\nThis project demonstrates Clean Architecture principles with three layers:\n\n### Domain Layer (`pkg/domain`)\n\n- Contains core business rules and interfaces\n- Has no external dependencies\n- Defines what transformers should do\n- `Transformer` and `Plugin` interfaces\n\n### Application Layer (`internal/app`)\n\n- Contains core application logic\n- Depends only on domain interfaces\n- Coordinates the transformation process\n- `Processor` that manages plugins and executes transformations\n\n### Infrastructure Layer (`plugins`)\n\n- Contains concrete implementations\n- Depends on domain interfaces\n- Implements specific transformation strategies\n- `passthrough` plugin\n\nThe project follows the Dependency Inversion Principle by:\n\n1. Defining abstractions in the domain layer\n2. Having both application and infrastructure layers depend on domain interfaces\n3. Ensuring all dependencies point toward the domain layer\n\n## Development\n\n### Creating New Plugins\n\nPlugins should be created in the `plugins` directory and implement the transformer interface from the domain layer. See the `passthrough` plugin for an example implementation.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcekrem%2Fgo-transform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcekrem%2Fgo-transform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcekrem%2Fgo-transform/lists"}