chore: optimize setup function names #1364
Merged
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.
Greptile Overview
Greptile Summary
This PR renames setup function names across the framework for improved semantic clarity and consistency.
Key Changes:
AddProviderApply→RegisterProviderandRemoveProviderApply→UnregisterProviderAddRouteApply→RegisterRouteandRemoveRouteApply→UnregisterRouteAddMigrationApply→RegisterMigrationandRemoveMigrationApply→UnregisterMigrationThe new naming convention uses
Register/Unregisterterminology which is more semantically meaningful and aligned with common programming patterns. The changes are purely cosmetic refactoring with no functional modifications - all function implementations remain identical, only the exported function names have changed. All usages have been consistently updated across the codebase.Confidence Score: 5/5
Important Files Changed
Register/Unregisterprefix instead ofAdd/Remove...Applyfor better semantic clarityRegisterProviderandUnregisterProvidernamesRegisterProvider,UnregisterProvider,RegisterRoute, andUnregisterRoutenamesRegisterProvider,UnregisterProvider,RegisterMigration, andUnregisterMigrationnamesRegisterProvider,UnregisterProvider,RegisterRoute, andUnregisterRoutenamesSequence Diagram
sequenceDiagram participant Setup as Setup Script participant Modify as packages/modify participant FS as File System Note over Setup,FS: Installation Flow Setup->>Modify: RegisterProvider(pkg, provider) Modify->>FS: Add provider to bootstrap/providers.go Setup->>Modify: RegisterRoute(pkg, route) Modify->>FS: Add route to WithRouting function Setup->>Modify: RegisterMigration(pkg, migration) Modify->>FS: Add migration to migration list Note over Setup,FS: Uninstallation Flow Setup->>Modify: UnregisterProvider(pkg, provider) Modify->>FS: Remove provider from bootstrap/providers.go Setup->>Modify: UnregisterRoute(pkg, route) Modify->>FS: Remove route from WithRouting function Setup->>Modify: UnregisterMigration(pkg, migration) Modify->>FS: Remove migration from migration list