This repository has been archived by the owner on Mar 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor construction to use Dig for DI
What I Did ------------ Refactored a bunch of stuff, should be no customer/vendor visible changes. How I Did it ------------ - Incorporate [uber-go/dig](https://github.com/uber-go/dig) for dependency injection. This library is not crazy busy, but did have a commit a few days ago. It's pretty small too. - Change a lot a lot of `XXXFromViper` methods to just `NewXXX`, and they just receive the deps they need. - Cleaned up a lot of constructor functions, embedding `dig.In` lets us drop some entirely - Added a test in pkg/ship/dig_test.go to ensure that we can instatiate a `ship.Ship` Other random stuff I did ----------------- - Removed some old `Installation` stuff from ConfigCtx, it gets applied separately now via @kevinherro 's `InstallationContext` - refactored ship to call its own `ExitWithError` during `ExecuteAndMaybeExit`, instead of forcing clients to call it - replaced some `templates.NewStaticContext` to use the `BuilderBuilder` version How to verify it ------------ Write new code, enjoy less boilerplate. Description for the Changelog ------------ None, this is purely a refactor Picture of a Boat (not required but encouraged) ------------ ![](https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTw-m9sgmGy5ac22drQCz6SHNWQggn5PrM_bMJXjx1RfQVwHvyl)
- Loading branch information
Showing
63 changed files
with
6,647 additions
and
489 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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.