diff options
Diffstat (limited to 'src/strings/replace.go')
| -rw-r--r-- | src/strings/replace.go | 8 |
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} } |
