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.
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
feat(server/v2): add config & start helper #20505
feat(server/v2): add config & start helper #20505
Changes from 139 commits
d530e80
0a15db8
8455318
62ded17
5c4a43a
decf4a2
dbf509e
d845064
ed638cd
cb2cc01
da38aff
2691838
faba9d1
35fd591
e394e18
cce35fc
d2241fa
15619d9
ca160d8
65db2cf
7308c68
2a12963
a7503e4
1eac3b2
2c3ce95
aa91391
d3b3a24
05942a0
3fd6eb3
a9ef4e4
290263f
00f6999
a63762e
4b86a66
04b8f98
73e00c0
e9e8ab8
b16d2bc
330b8ed
fc684c5
108978d
be3b27b
24e019b
2ca0c70
b427037
02947fa
5bf88be
e55810e
b50f50c
b029625
cbab735
2738109
92539ec
c95c217
bb09616
bb1c1cc
f1b9a29
c529edd
3e8ce5a
27a75ba
4b125e1
8b2025c
6eda0c7
bf16d79
f235226
87d1c5b
aa21e93
52b883e
acfb730
aa0cebd
fd34264
9557e39
cadd5e1
2a2b3f1
98ff414
d6e93ec
0379c26
bf3cc8a
2bb2b90
ce36a1c
b9be347
647d92b
44c465b
faf1450
a2312d0
591bb8e
bd7efda
f9c110d
83f873a
6d2c424
88c260a
4588c33
6d6cf45
128794b
1c074d3
6f36227
2ad7cbf
5a9e899
6db27f3
417029d
7d72206
0a5b6d0
4f54b95
2759dab
fb32eaf
c6f6902
64a51f9
f59e682
99bc320
8ebdc82
eb6d1f6
921b627
d10b7dd
83440d8
08cf9af
68c61d5
959542e
88a2a0b
20ef626
e7178c6
14419bd
6ed4b0f
343258c
8c1e2d2
d914de2
6577d23
2dc02c0
03e791b
fd39547
b02723f
c73e11e
0243a83
40f9393
77e1603
921be8a
b461b1e
5faae0e
f1b548e
a53bec5
b55308c
1984513
5efd125
badaa02
4b516cb
58c7acd
f4c1db7
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider providing default components when none are supplied.
The current implementation throws an error when no components are provided. Consider providing sensible defaults or a clear message guiding the user on how to supply components.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The call to
server.Init(app, v, l)
lacks error handling, which could lead to issues if the initialization fails. Proper error management is crucial in this context.Committable suggestion
Tools
GitHub Check: gosec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure proper handling of
PersistentPreRun
.The logic here overrides
PersistentPreRunE
but does not account for the possibility thatPersistentPreRun
might be set. Consider integrating or documenting how both should be handled to avoid confusion or unintended behavior.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optimize configuration reading and context setting.
The current implementation of
configHandle
could be optimized by checking for the existence of the configuration directory early and simplifying error handling. Consider refactoring to reduce redundancy and improve clarity.Committable suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
configHandle
function performs essential configuration management tasks. However, the error handling within this function could be improved by adding detailed error messages, especially when configuration files are missing or incorrect.Committable suggestion