FormatURIs formats a list of string literals or placeholders containing URIs.
(uris []Expr)
| 560 | |
| 561 | // FormatURIs formats a list of string literals or placeholders containing URIs. |
| 562 | func (ctx *FmtCtx) FormatURIs(uris []Expr) { |
| 563 | if len(uris) > 1 { |
| 564 | ctx.WriteString("(") |
| 565 | } |
| 566 | for i, uri := range uris { |
| 567 | if i > 0 { |
| 568 | ctx.WriteString(", ") |
| 569 | } |
| 570 | ctx.FormatURI(uri) |
| 571 | } |
| 572 | if len(uris) > 1 { |
| 573 | ctx.WriteString(")") |
| 574 | } |
| 575 | } |
| 576 | |
| 577 | // FormatURI formats a string literal or placeholder containing a URI. If the |
| 578 | // node is a string literal, we redact the contents to avoid leaking secrets. |