Example #1
0
func WriteIdx(w io.Writer, index map[string]FileInfo) error {
	err := util.WriteObject(w, index)
	if err != nil {
		return err
	}

	return nil
}
Example #2
0
func writeMsg(w io.Writer, msgType byte, msg interface{}) error {
	err := writeOneByte(w, msgType)
	if err != nil {
		return err
	}

	err = util.WriteObject(w, msg)
	if err != nil {
		return err
	}

	return nil
}