Reorganize project structure and rename binary#2
Merged
Conversation
Removes internal/ from all package paths — internal/ only restricts imports from outside the module, which is irrelevant for a CLI binary with no external consumers. Package renames (import path changes only, no logic changes): internal/cache → cache internal/cli → cli internal/config → config internal/leetcode → leetcode internal/patterns → patterns internal/quiz → quiz internal/server → server Entry point: cmd/pattern-drill → cmd/coding-interview-pattern-drill goreleaser: project_name, binary, brew formula all renamed to coding-interview-pattern-drill. https://claude.ai/code/session_01CSqri29pumwCCTp4ApU2da
Replaces all remaining github.com/conallob/coding-interview-pop-quiz/internal/<pkg> references with github.com/conallob/coding-interview-pop-quiz/<pkg> after the directory restructure in the previous commit. https://claude.ai/code/session_01CSqri29pumwCCTp4ApU2da
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.
Summary
This PR reorganizes the project structure by moving internal packages to the root level and renames the binary from
pattern-drilltocoding-interview-pattern-drillfor consistency with the module name.Key Changes
Restructured package layout: Moved all packages from
internal/directory to root level:internal/cache→cacheinternal/config→configinternal/leetcode→leetcodeinternal/patterns→patternsinternal/quiz→quizCreated new entry point: Added
cmd/coding-interview-pattern-drill/main.gothat:server.Run()when invoked withserveargumentcli.Run()for default CLI behaviorMoved CLI and server packages: Relocated
cli/andserver/packages to root level alongside other packagesUpdated all import paths: Changed all internal imports across the codebase to reference packages at root level instead of
internal/subdirectoryUpdated build configuration: Modified
.goreleaser.yamlto reflect new binary name and build paths:pattern-drill→coding-interview-pattern-drillImplementation Details
The reorganization simplifies the package structure by removing the
internal/directory convention, making packages more accessible and reducing import path complexity. The new main entry point provides a unified CLI interface that can switch between interactive CLI mode and server mode based on command-line arguments.https://claude.ai/code/session_01CSqri29pumwCCTp4ApU2da