pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/Masterminds/sprig/pull/483

l" rel="stylesheet" href="https://github.githubassets.com/assets/pull-requests-be6017ec12798e73.css" /> docs: clarify quote/squote escaping behavior by Solaris-star · Pull Request #483 · Masterminds/sprig · GitHub
Skip to content

docs: clarify quote/squote escaping behavior - #483

Open
Solaris-star wants to merge 1 commit into
Masterminds:masterfrom
Solaris-star:docs/481-quote-escape-docs
Open

docs: clarify quote/squote escaping behavior#483
Solaris-star wants to merge 1 commit into
Masterminds:masterfrom
Solaris-star:docs/481-quote-escape-docs

Conversation

@Solaris-star

Copy link
Copy Markdown

Description

The docs for quote / squote only said they wrap a string in quotes. quote actually uses Go's %q verb (fmt.Sprintf("%q", ...)), so contents are escaped with Go string syntax. squote only adds surrounding single quotes without that escaping.

Fix

Expand the quote and squote section in docs/strings.md to describe escaping behavior and give simple examples.

Linked Issue

Closes #481

Document that quote uses Go %q escaping (not only wrapping) and that
squote only adds surrounding single quotes without Go string escaping.

Fixes Masterminds#481
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve docs of quote functions

1 participant

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy