aboutsummaryrefslogtreecommitdiff
path: root/src/strings/replace.go
diff options
context:
space:
mode:
authorFilippo Valsorda <filippo@golang.org>2018-10-15 17:09:34 -0400
committerFilippo Valsorda <filippo@golang.org>2018-10-15 17:09:34 -0400
commit623650b27aa42dd2ccd20fc4a79f8fe7b8559987 (patch)
treebfafa16d1bfd57fc1d9831c22e6e236be3d52281 /src/strings/replace.go
parent36c789b1fd72af5ff6e756794597a3a85e069998 (diff)
parent1961d8d72a53e780effa18bfa8dbe4e4282df0b2 (diff)
downloadgo-623650b27aa42dd2ccd20fc4a79f8fe7b8559987.tar.xz
[dev.boringcrypto] all: merge master into dev.boringcrypto
Change-Id: I218ba1b89a2df6e4335c6a5846889d9a04affe5d
Diffstat (limited to 'src/strings/replace.go')
-rw-r--r--src/strings/replace.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/strings/replace.go b/src/strings/replace.go
index dbda950194..9ddf5e1e3f 100644
--- a/src/strings/replace.go
+++ b/src/strings/replace.go
@@ -308,10 +308,6 @@ func (w *appendSliceWriter) WriteString(s string) (int, error) {
return len(s), nil
}
-type stringWriterIface interface {
- WriteString(string) (int, error)
-}
-
type stringWriter struct {
w io.Writer
}
@@ -320,8 +316,8 @@ func (w stringWriter) WriteString(s string) (int, error) {
return w.w.Write([]byte(s))
}
-func getStringWriter(w io.Writer) stringWriterIface {
- sw, ok := w.(stringWriterIface)
+func getStringWriter(w io.Writer) io.StringWriter {
+ sw, ok := w.(io.StringWriter)
if !ok {
sw = stringWriter{w}
}