feat(sidekick/swift): a lookup helper#5061
Conversation
In Rust, too many times I wrote, `fmt.Error("could not find thing")`.
I think we can just have a lookup function that returns the error.
There was a problem hiding this comment.
Code Review
This pull request introduces a lookupMessage helper function within the Swift generator package, accompanied by unit tests. The review feedback suggests moving this utility to the shared api package to promote reusability across other language generators. Additionally, it is recommended to refactor the error handling to follow the 'Indent Error Flow' principle and to simplify test failure messages by using t.Fatal(err) directly.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new helper function, lookupMessage, to retrieve messages by ID from the API model, along with corresponding unit tests. The review correctly identified that the new function lacks a required doc comment, and a suggestion has been provided to address this documentation standard.
In Rust, too many times I wrote,
fmt.Error("could not find thing"). I think we can just have a lookup function that returns the error.Towards #5037 and #5060