refactor: use Options struct in aibridgedserver.NewServer - #27200
Merged
Conversation
ssncferreira
force-pushed
the
ssncf/aibridgedserver-options
branch
4 times, most recently
from
July 14, 2026 08:39
5182a55 to
f025c08
Compare
ssncferreira
force-pushed
the
ssncf/aibridgedserver-options
branch
from
July 14, 2026 08:43
f025c08 to
a26422a
Compare
ssncferreira
marked this pull request as ready for review
July 14, 2026 08:44
pawbana
approved these changes
Jul 16, 2026
| ) (*Server, error) { | ||
| eac := make(map[string]*externalauth.Config, len(externalAuthConfigs)) | ||
| // Options carries the dependencies required to construct an aibridged Server. | ||
| type Options struct { |
Contributor
There was a problem hiding this comment.
nit: when there are lot of members in struct I like to keep them sorted somehow for easier lookup, alphabetically or some combination of alphabetically + arbitrary "important" -> "boilerplate" ordering + optional domain grouping.
nit+: it is also nice to keep similar order when creating such struct.
Contributor
Author
There was a problem hiding this comment.
I like that as well 👍 Initially, I didn't want to change a lot of the structure to keep it the same as before, but this looks nicer. Grouped into 1) Dependencies, 2) Configuration, 3) Common. Addressed in 34068e4
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Refactor
aibridgedserver.NewServerto take anOptionsstruct instead of a long list of positional arguments. Follow-up to review feedback in #27117 (comment)