github.com/cnotch/ipchub@v1.1.0/av/format/rtsp/stringwriter.go (about) 1 // Copyright (c) 2019,CAOHONGJU All rights reserved. 2 // Use of this source code is governed by a MIT-style 3 // license that can be found in the LICENSE file. 4 5 package rtsp 6 7 import "io" 8 9 type writeStringer interface { 10 WriteString(s string) (n int, err error) 11 } 12 13 type stringWriter struct { 14 w io.Writer 15 } 16 17 func (sw stringWriter) WriteString(s string) (n int, err error) { 18 return sw.w.Write([]byte(s)) 19 }