-
Notifications
You must be signed in to change notification settings - Fork 69
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(entities): Support custom attributes JSON #1526
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1526 +/- ##
==========================================
+ Coverage 47.40% 47.48% +0.07%
==========================================
Files 125 125
Lines 7716 7742 +26
==========================================
+ Hits 3658 3676 +18
- Misses 3917 3925 +8
Partials 141 141
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -127,3 +142,23 @@ func parseCustomAttributes(a *[]string) (*map[string]string, error) { | |||
|
|||
return &customAttributeMap, nil | |||
} | |||
|
|||
func getCustomAttributes(a []string, b string) (interface{}, error) { |
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.
Can we make this function always return *map[string]interface{}
or map[string]interface{}
instead of interface{}
? Then you won't need to use the switch statement.
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.
:butting-in-emoji: map[string]interface{}
's zero value is nil since it's a reference type, so no need for*map[string]interface{}
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.
Thanks, done in ed2172c
This reverts commit a37c703.
Supports JSON strings for
--customAttributes
for deployment markers. Ref: NR-165686.