-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: `packages` package (!) has been restructured to better separate the underlying concerns. The new structure looks like following: ``` pkg/kudoctl/packages/ ├── reader │ ├── parser.go │ ├── read_dir.go │ ├── reader.go │ ├── reader_tar.go │ └── reader_test.go ├── resolver │ ├── resolver.go │ ├── resolver_local.go │ ├── resolver_local_test.go │ ├── resolver_test.go │ └── resolver_url.go ├── writer │ ├── writer_tar.go │ └── writer_test.go ├── testdata │ └── ... ├── types.go └── package.go ``` **tl;dr:** - methods and files has been split across three concerns: `reader`, `writer` and `resolver` - `finder` got renamed to `resolver`: it doesn't so much search for packages as it does resolving passed package name to an underlying location - eliminated code duplication e.g. `util/kudo/resources.go` was reimplementing what resolver is doing - all the types now live in `packages/types.go` and are addressed with package prefix e.g. `packages.Files`. This allowed to shorten type names. - moved other methods to where they were used e.g. new `digest.go` is living in the `repo` now - `install.go` and `upgrade.go` commands are now using the `resolver` directly
- Loading branch information
Aleksey Dukhovniy
authored
Nov 14, 2019
1 parent
2a585ae
commit bd59d03
Showing
30 changed files
with
911 additions
and
853 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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.