Closed xrn closed 1 year ago
@rubenfonseca any chance that you will take a look?
Hi @xrn this is great work! However, I'm worried that this is a breaking change that will require us to release a new major (v8) version. Have you considered making the argument list variable?
func FindInMapPtr(mapName, topLevelKey, secondLevelKey interface{}, additional ...interface{}) *string {
...
}
This way we can support both use cases at the same time. What do you think?
Both works for me but tbh when trying that way some tests from intrinsics_test.go
are failing and not sure how to solve correctly (I am not senior Go dev but trying my best :D)
Overall would be awesome to have support for that default, will simplify templates a lot
Hi @xrn do you want to try to change the function signature as suggested?
Patch coverage: 52.00
% and project coverage change: -0.34
:warning:
Comparison is base (
5ab72b1
) 6.13% compared to head (61941fc
) 5.80%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
@rubenfonseca can you take a look, sth like that works for you?
@rubenfonseca pls take a look - it would be very useful to have it
Thanks @xrn I'll look at this tomorrow!
Looking at this now
:tada: This PR is included in version 7.8.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Adding support for FindInMap default value:
Description of changes: This probably would be breaking change because of additional parameter in a function
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.