You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

14 lines
274 B

package binary
import "io"
type Binary interface {
WriteTo(w io.Writer) (int64, error)
}
func WriteOnto(b Binary, w io.Writer, n int64, err error) (int64, error) {
if err != nil { return n, err }
var n_ int64
n_, err = b.WriteTo(w)
return n+n_, err
}