-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmdutil: simplify SeedArgFor to take a string instead of a
namer
Simplify the previous commit so that SeedArgFor() takes strings for the image type and distribution instead of the `namer` interface. This makes the code a little bit easier to follow but now the `distro.Distro` and `distro.ImageType` cannot be directly passed into the helper anymore so it's a tradeoff. Ideally it would just take `distro.{Distro,ImageType}` but for that we would need an easy way to construct fake objects of these types in our tests which there (currently) is not (AFAICT). So settle with this approach as a compromise for now.
- Loading branch information
Showing
4 changed files
with
8 additions
and
20 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