ripple-api/vendor/github.com/thehowl/conf/escape.go
Morgan Bazalgette 3961e310b1 vendor!
2017-01-14 18:42:10 +01:00

16 lines
256 B
Go

package conf
import (
"strings"
)
// Escape escapes characters for then putting it into conf field/values without issues.
func Escape(s string) string {
return strings.NewReplacer(
"\n", "\\\n",
`\`, `\\`,
`;`, `\;`,
`=`, `\=`,
).Replace(s)
}