Skip to content

refactor: move internal/cloud to pkg/cloud - #880

Merged
cdalar merged 1 commit into
mainfrom
worktree-pkg-cloud-rename
Jun 4, 2026
Merged

cdalar merged 1 commit into
mainfrom
worktree-pkg-cloud-rename

Conversation

@cdalar

@cdalar cdalar commented Jun 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Rename internal/cloud/ β†’ pkg/cloud/
  • Update all 7 import sites in cmd/
  • Delete internal/cloud/

Why

internal/ in Go only blocks the compiler β€” it doesn't hide source code since the repo is public. The restriction was preventing onctl-platform (the private SaaS backend) from importing ProviderHetzner and CloudProviderInterface directly.

Moving to pkg/cloud/ makes it a proper public library API so the platform can go get github.com/cdalar/onctl/pkg/cloud and use the provider directly without vendoring or subprocess shelling.

Test plan

  • go build ./... β€” clean
  • go test ./pkg/cloud/... ./cmd/... β€” passes

@cdalar
cdalar enabled auto-merge (squash) June 4, 2026 20:18
Makes the cloud provider package importable from external modules
(e.g. onctl-platform SaaS backend). The internal/ restriction only
blocked the Go compiler, not source visibility β€” the repo is public
either way, so there is no security benefit to keeping it internal.

All import paths updated; build and tests confirmed clean.
@cdalar
cdalar force-pushed the worktree-pkg-cloud-rename branch from 282af94 to 7bd95d3 Compare June 4, 2026 20:18
@cdalar
cdalar merged commit a7032a0 into main Jun 4, 2026
9 of 10 checks passed
@cdalar
cdalar deleted the worktree-pkg-cloud-rename branch August 19, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

⌂ 捒网址