-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkg/asset/installconfig/platform: Drop *PlatformType for types.{platform}.Name #659
pkg/asset/installconfig/platform: Drop *PlatformType for types.{platform}.Name #659
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: wking The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
I would expect the consumers to sort however they want, i don't think it should be part of the |
That's effectively "if you care about order, make a copy and sort it yourself", right? Why is that better than having an opinion here (e.g. alphabetical) and only require consumers to copy/sort when they need something else? |
It's just odd that order is part of the |
9bf2fe6
to
6a04f63
Compare
Rebased around #657 and pushed the names down into the per-platform packages with 9bf2fe6 -> 1e129fe. |
…orm}.Name The old *PlatformType are from cccbb37 (Generate installation assets via a dependency graph, 2018-08-10, openshift#120), but since 476be07 (pkg/asset: use vendored cluster-api instead of go templates, 2018-10-30, openshift#573), we've had variables for the name strings in the more central pkg/types. With this commit, we drop the more peripheral forms. I've also pushed the types.PlatformName{Platform} variables down into types.{platform}.Name at Ahbinav's suggestion [1]. I've added a unit test to enforce sorting in PlatformNames, because the order is required by sort.SearchStrings in queryUserForPlatform. [1]: openshift#659 (comment)
6a04f63
to
1e129fe
Compare
/lgtm |
The old
*PlatformType
are from cccbb37 (#120), but since 476be07 (#573), we've had variables for the name strings in the more centralpkg/types
. With this pull request, we drop the more peripheral forms.I've added a unit test to enforce sorting in
PlatformNames
, because the order is required bysort.SearchStrings
inqueryUserForPlatform
.This will have trivial conflicts with #657, but I'm fine rebasing after one of these lands.