escape

package
v0.0.0-...-472ff39 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EscapeTemplatedString

func EscapeTemplatedString(s string, escapeFn func(string) string) string

Escape a string which may contain Go templates.

The content of the template is not escaped.

This function is only useful where the template output is not expected to be escaped. If the template output needs escaping too, then expand the template before escaping instead.

The new escaped string is returned.

func EscapeTemplatedStringList

func EscapeTemplatedStringList(list []string, escapeFn func(string) string) []string

Escape a string which may contain Go templates.

A new slice containing the escaped strings is returned.

func MakefileAndShellEscape

func MakefileAndShellEscape(s string) string

Escape characters that are special to either Make or the shell.

The new escaped string is returned.

func MakefileAndShellEscapeList

func MakefileAndShellEscapeList(list []string) []string

Escape characters that are special to either Make or the shell.

A new slice containing the escaped strings is returned.

func MakefileEscape

func MakefileEscape(s string) string

Escape characters in a string that Make may interpret in recipes (as part of the rule context).

Ocurrences of $ need to be escaped as $$. The new escaped string is returned.

func MakefileEscapeList

func MakefileEscapeList(list []string) []string

Escape characters in a list of strings that Make may interpret in recipes (as part of the rule context).

A new slice containing the escaped strings is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL