func WriteFull(data []byte, writer io.Writer) (n int, err error) {
	dataSize := len(data)
	for n = 0; n < dataSize; {
		m, err := writer.Write(data[n:])
		n += m
		if err != nil {
			return n, err
		}
	}
	return dataSize, nil
}
func WriteFull(data []byte, writer io.Writer) (n int, err error) {
	dataSize := len(data)
	for n = 0; n < dataSize; {
		m, err := writer.Write(data[n:])
		n += m
		if err != nil {
			return n, err
		}
	}
	return dataSize, nil
}
func WriteFull ( data [ ] byte , writer io . Writer ) ( n int , err error ) { dataSize := len ( data ) for n = 0 ; n < dataSize ; { m , err := writer . Write ( data [ n : ] ) n += m if err != nil { return n , err } } return dataSize , nil }
// WriteFull calls writer.Write until all of data is written,
// or an is error returned.
WriteFull calls writer . Write until all of data is written or an is error returned .