github.com/nikandfor/tlog@v0.21.5-0.20231108111739-3ef89426a96d/convert/copy.go (about) 1 package convert 2 3 import ( 4 "io" 5 6 "github.com/nikandfor/tlog/tlwire" 7 ) 8 9 func Copy(w io.Writer, r io.Reader) (int64, error) { 10 d := tlwire.NewStreamDecoder(r) 11 12 return d.WriteTo(w) 13 }