auth.go
func (c Auth) Write(w *bufio.Writer) (err error) {
	if _, err = w.WriteString("AUTH\n"); err != nil {
		err = errors.Wrap(err, "writing AUTH command")
		return
	}

	if err = binary.Write(w, binary.BigEndian, uint32(len(c.Secret))); err != nil {
		err = errors.Wrap(err, "writing AUTH secret size")
		return
	}

	if _, err = w.WriteString(c.Secret); err != nil {
		err = errors.Wrap(err, "writing AUTH secret data")
		return
	}

	return
}
func (c Auth) Write(w *bufio.Writer) (err error) {
	if _, err = w.WriteString("AUTH\n"); err != nil {
		err = errors.Wrap(err, "writing AUTH command")
		return
	}

	if err = binary.Write(w, binary.BigEndian, uint32(len(c.Secret))); err != nil {
		err = errors.Wrap(err, "writing AUTH secret size")
		return
	}

	if _, err = w.WriteString(c.Secret); err != nil {
		err = errors.Wrap(err, "writing AUTH secret data")
		return
	}

	return
}
// Write serializes the command to the given buffered output, satisfies the
// Command interface.