Repository navigation
Conversation
thde
added this pull request to stack #459
September 17, 2026 11:12
thde
force-pushed
the
thde/352-06-cli-format-split
branch
from
October 6, 2026 08:35
46fdfd2 to
11b5f84
Compare
The command-hint builder (Command(), LoginCommand, LogoutCommand) only feeds Error.WithSuggestions and login hints, so it belongs next to Error in internal/cli. Inline the failure prefix in Error.Error so cli no longer imports format; api and api/config now depend on cli only.
ManagedByAnnotation, Name and IsManagedBy describe Kubernetes object annotations and api.DefaultAnnotations is their main consumer, so they belong in api rather than in internal/cli, which is now limited to Error, exit codes and command hints.
missingChildren, exitIfErrorf and the flag placeholder interpolation are kong parser plumbing used by main.go only; format now contains nothing but output formatting.
TestLayering enumerates the packages of the module and checks their imports against the layering the restructure established: api/... uses only api/... and internal/cli, internal/cli, internal/format and internal/logbox use nothing else of the module, and verbs are imported by main and other verbs only. Test files may additionally import internal/test for fixtures.
thde
force-pushed
the
thde/352-06-cli-format-split
branch
from
October 9, 2026 09:04
11b5f84 to
ca7688c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TestLayering enumerates the packages of the module and checks their
imports against the layering the restructure established: api/... uses
only api/... and internal/cli, internal/cli, internal/format and
internal/logbox use nothing else of the module, and verbs are imported
by main and other verbs only. Test files may additionally import
internal/test for fixtures.