aboutsummaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/text/internal/gen/code.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/golang.org/x/text/internal/gen/code.go')
-rw-r--r--vendor/golang.org/x/text/internal/gen/code.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/vendor/golang.org/x/text/internal/gen/code.go b/vendor/golang.org/x/text/internal/gen/code.go
index ca917d2..2202c9f 100644
--- a/vendor/golang.org/x/text/internal/gen/code.go
+++ b/vendor/golang.org/x/text/internal/gen/code.go
@@ -187,6 +187,7 @@ func (w *CodeWriter) writeValue(v reflect.Value) {
// WriteString writes a string literal.
func (w *CodeWriter) WriteString(s string) {
+ s = strings.Replace(s, `\`, `\\`, -1)
io.WriteString(w.Hash, s) // content hash
w.Size += len(s)