Closed jorge-ibm closed 4 years ago
@padamstx - I've changed the method to return an error, along with the other changes you requested.
:tada: This PR is included in version 4.3.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
This PR adds a new method,
ConvertSlice
which converts any non-string slice to a string slice using the gomarshal
method, along with string manipulation.I chose to return an empty slice if an error occurs during conversion to reduce the generated code needed to use this method, though if we feel it's best to return an error rather than an empty slice I'm not against that change. I've added test cases to hopefully capture all the realistic scenarios this method would be used in.
ref: https://github.ibm.com/arf/planning-sdk-squad/issues/1904