From cf19626489b8a2af7a78e4d3d6dc0d6643e01463 Mon Sep 17 00:00:00 2001 From: Riley Rice Date: Fri, 16 Jan 2026 13:55:42 -0800 Subject: [PATCH] feat: change plugins to be at top-level --- .github/CODEOWNERS | 2 +- CONTRIBUTING.md | 2 +- Makefile | 2 +- internal/cli/generate.go | 4 ++-- {internal/plugins => plugins}/cgo/mapper.go | 0 {internal/plugins => plugins}/cgo/mapper_test.go | 0 {internal/plugins => plugins}/cgo/plugin.go | 0 {internal/plugins => plugins}/python/mapper.go | 0 {internal/plugins => plugins}/python/mapper_test.go | 0 {internal/plugins => plugins}/python/plugin.go | 0 tests/integration/bindings_test.go | 4 ++-- 11 files changed, 7 insertions(+), 7 deletions(-) rename {internal/plugins => plugins}/cgo/mapper.go (100%) rename {internal/plugins => plugins}/cgo/mapper_test.go (100%) rename {internal/plugins => plugins}/cgo/plugin.go (100%) rename {internal/plugins => plugins}/python/mapper.go (100%) rename {internal/plugins => plugins}/python/mapper_test.go (100%) rename {internal/plugins => plugins}/python/plugin.go (100%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 9193a60..c579d99 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -8,7 +8,7 @@ /internal/core/ @riceriley59 # Plugin implementations -/internal/plugins/ @riceriley59 +/plugins/ @riceriley59 # CLI /internal/cli/ @riceriley59 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b9ecd05..93fa85b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -85,7 +85,7 @@ When reporting issues, please include: If you're adding a new language plugin: -1. Create a new package under `internal/plugins//` +1. Create a new package under `plugins//` 2. Implement the `core.Plugin` interface 3. Register the plugin in `init()` using `factory.Register()` 4. Add comprehensive tests diff --git a/Makefile b/Makefile index 7fd2dd5..e9a7c4b 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ include deps.mk GIT_SHA := $(shell git rev-parse --short HEAD) -GIT_TAG_LAST := $(shell git tag --list 'operator*' --sort=-v:refname | head -n 1 | cut -d/ -f2) +GIT_TAG_LAST := $(shell git tag --list 'v*' --sort=-v:refname | head -n 1) ## GO Flags GO_LDFLAGS := -ldflags "-X github.com/riceriley59/goanywhere/internal/version.GIT_SHA=$(GIT_SHA) \ diff --git a/internal/cli/generate.go b/internal/cli/generate.go index 898b91f..97405b2 100644 --- a/internal/cli/generate.go +++ b/internal/cli/generate.go @@ -12,8 +12,8 @@ import ( "github.com/riceriley59/goanywhere/internal/core/factory" // Register plugins - _ "github.com/riceriley59/goanywhere/internal/plugins/cgo" - _ "github.com/riceriley59/goanywhere/internal/plugins/python" + _ "github.com/riceriley59/goanywhere/plugins/cgo" + _ "github.com/riceriley59/goanywhere/plugins/python" ) type generateOptions struct { diff --git a/internal/plugins/cgo/mapper.go b/plugins/cgo/mapper.go similarity index 100% rename from internal/plugins/cgo/mapper.go rename to plugins/cgo/mapper.go diff --git a/internal/plugins/cgo/mapper_test.go b/plugins/cgo/mapper_test.go similarity index 100% rename from internal/plugins/cgo/mapper_test.go rename to plugins/cgo/mapper_test.go diff --git a/internal/plugins/cgo/plugin.go b/plugins/cgo/plugin.go similarity index 100% rename from internal/plugins/cgo/plugin.go rename to plugins/cgo/plugin.go diff --git a/internal/plugins/python/mapper.go b/plugins/python/mapper.go similarity index 100% rename from internal/plugins/python/mapper.go rename to plugins/python/mapper.go diff --git a/internal/plugins/python/mapper_test.go b/plugins/python/mapper_test.go similarity index 100% rename from internal/plugins/python/mapper_test.go rename to plugins/python/mapper_test.go diff --git a/internal/plugins/python/plugin.go b/plugins/python/plugin.go similarity index 100% rename from internal/plugins/python/plugin.go rename to plugins/python/plugin.go diff --git a/tests/integration/bindings_test.go b/tests/integration/bindings_test.go index f0bc4f8..7c34e72 100644 --- a/tests/integration/bindings_test.go +++ b/tests/integration/bindings_test.go @@ -9,8 +9,8 @@ import ( . "github.com/onsi/gomega" "github.com/riceriley59/goanywhere/internal/core" - "github.com/riceriley59/goanywhere/internal/plugins/cgo" - "github.com/riceriley59/goanywhere/internal/plugins/python" + "github.com/riceriley59/goanywhere/plugins/cgo" + "github.com/riceriley59/goanywhere/plugins/python" ) func TestIntegration(t *testing.T) {