Repository navigation
Conversation
The previous code was panic()ing on invalid input. This is no longer an option as we will define platforms in YAML and here we need to be able to handle incorrect input more gracefully than a panic. The callers are also updated.
The error so far could be more helpful, so far we do: ``` unsupported architecture ``` instead we now error with the unsupported architecture as part of the error message. ``` unsupported architecture <unsupported-arch> ```
We will define the platform in YAML so we need a way to unmarshal the architecture (that is part of the platform).
Contributor
Author
|
Closing in favor of #1508 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is another split out from #1462 - we will want to define the platforms for the image types in YAML too. Because the architecture(s) are part of that platform definition we need it to be unmarshal-able.
This is part of https://github.com/osbuild/images/compare/main...mvo5:platform_yaml?expand=1 which I will open after (and all part of the larger 1462 effort).
arch: add unmarshal support for arch.Arch
We will define the platform in YAML so we need a way to
unmarshal the architecture (that is part of the platform).
arch: add architecture to "unsupported architecture" errors
The error so far could be more helpful, so far we do:
instead we now error with the unsupported architecture as
part of the error message.
arch: make arch.FromString() return an error on invalid input
The previous code was panic()ing on invalid input. This is no
longer an option as we will define platforms in YAML and here
we need to be able to handle incorrect input more gracefully
than a panic. The callers are also updated.