-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
refactor: add module name to message server #14352
Conversation
for k := range msr.names { | ||
if strings.Contains(msgUrl, k) { | ||
if !strings.Contains(k, ":") { // avoid setting moduleurl to storekeys like transient:params | ||
msr.moduleNames[msgUrl] = k // put the module name on the message url | ||
} | ||
} | ||
} |
Check failure
Code scanning / gosec
the value in the range statement should be _ unless copying a map: want: for key := range m
for k := range msr.names { | ||
if strings.Contains(msgUrl, k) { | ||
if !strings.Contains(k, ":") { // avoid setting moduleurl to storekeys like transient:params | ||
msr.moduleNames[msgUrl] = k // put the module name on the message url | ||
} | ||
} | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map
I think we may need something similar for queries in the future to fill remove the need to register errors with module names if that path is chosen. |
Closing in favor of #14356 |
Description
this pr uses store keys as module message url identifiers instead of a string search.
this can also be used to wrap errors on return of message result removing the need to register errors
attempt to close: #14295
this is a bit hacky but safer then strings.Split(".") imo
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change