-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There are too many exported identifiers in package godfish. A developer interested in making a new driver implementation really just needs to know about the Driver interface and not much else. Split up the code so that the only exposed functionality may build: - a Driver implementation (pkg godfish/drivers/...) - a standalone binary (pkg godfish/internal/cmd) The material that was in pkg godfish is important to get that working, but is probably not necessary for outside consumers. Most of these changes involve moving material from pkg godfish to pkg internal, adjusting callers, and ensuring that pkg godfish's exported API doesn't reference pkg internal. Other notable changes are: - Change UpdateSchemaMigrations signature. Putting the Direction type in a method signature complicates things IMO; in practice, it means up or down, so a boolean makes more sense here. The Direction type is useful for disambiguating labels for the direction in a migration filename, but that's not a concern for a Driver implementation. - Remove func CreateSchemaMigrations because it's not used anywhere and the functionality is already in a Driver method. - Move buildtime versioning info variables to pkg cmd because the Version type is now in pkg internal. - Move validation for direction label to ensure it's always validated, not just in the subcommand. - Move pkg info stuff into pkg internal, this simplifies dependencies.
- Loading branch information
1 parent
88b0f7d
commit 8a21e47
Showing
32 changed files
with
438 additions
and
378 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.