feat: [#823] register service providers to bootstrap/providers.go#77
Merged
feat: [#823] register service providers to bootstrap/providers.go#77
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request implements conditional service provider registration to support bootstrap setups, allowing the Postgres service provider to be registered either in app.go (traditional setup) or providers.go (bootstrap setup) depending on the environment configuration.
Key changes:
- Refactored setup logic to conditionally register/unregister the Postgres service provider based on
env.IsBootstrapSetup() - Improved code maintainability by extracting config matchers into reusable variables
- Updated Go version and dependencies to newer versions
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| setup/setup.go | Refactored to support conditional provider registration using modify.When() and env.IsBootstrapSetup(), moved config variable to function scope for better encapsulation |
| go.mod | Updated Go version to 1.24.0, updated framework dependency, and added new indirect dependencies for UI libraries and utilities |
| go.sum | Updated checksums for all modified and new dependencies to maintain integrity |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
📑 Description
Closes goravel/goravel#823
This pull request updates dependencies in
go.modand refactors the setup logic insetup/setup.goto better support bootstrap setups and improve maintainability. The main changes include upgrading and adding several dependencies, and restructuring how the Postgres service provider is registered or removed depending on the environment.Dependency updates and additions:
bubbletea,lipgloss, etc.), clipboard support, and string utilities.Setup logic improvements:
setup/setup.goto use theenv.IsBootstrapSetup()function to conditionally register or remove the Postgres service provider in eitherapp.goorproviders.go, depending on the setup type. This makes the setup process more flexible and maintainable. [1] [2]databaseConnectionsConfig,databaseConfig), reducing duplication and potential for errors.Configuration handling:
database.go, using the new config key variables for consistency.These changes collectively improve dependency management, setup flexibility, and code maintainability.
✅ Checks