tpl/strings: Add strings.ReplacePairs function#14598
Conversation
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. |
2cb68a1 to
dd1a5af
Compare
5df8e9f to
c182f73
Compare
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. |
c182f73 to
94c0c94
Compare
Closes #14594
I recognize that the type checking (
types.TypeToString) is more strict than in otherstringsfunctions, but for this particular function using something likecast.ToStringSliceEjust doesn't feel right. So we're strict (stringor any of thetemplatetypes) on both the input and the replacement pairs.The signature is:
So you can do this:
Or this:
docs: https://deploy-preview-3424--gohugoio.netlify.app/functions/strings/replacepairs/