// Write creates a writable representation of a MMV dump
// and writes it to the passed writer.
Write creates a writable representation of a MMV dump
and writes it to the passed writer.
// Write creates a writable representation of a MMV dump // and writes it to the passed writer .
func Write(
	w io.Writer,
	header *Header,
	tocs []*Toc,
	metrics map[uint64]Metric,
	values map[uint64]*Value,
	instances map[uint64]Instance,
	indoms map[uint64]*InstanceDomain,
	strings map[uint64]*String,
) error {
	if _, err := fmt.Fprintf(w, `Version   = %v
Generated = %v
Toc Count = %v
Cluster   = %v
Process   = %v
Flags     = 0x%x
`, header.Version, header.G1, header.Toc, header.Cluster, header.Process, int(header.Flag)); err != nil {
		return err
	}
	return writeComponents(w, header, tocs, metrics, values, instances, indoms, strings)
}
func Write ( w io . Writer , header * Header , tocs [ ] * Toc , metrics map [ uint64 ] Metric , values map [ uint64 ] * Value , instances map [ uint64 ] Instance , indoms map [ uint64 ] * InstanceDomain , strings map [ uint64 ] * String , ) error { if _ , err := fmt . Fprintf ( w , `Version   = %v
Generated = %v
Toc Count = %v
Cluster   = %v
Process   = %v
Flags     = 0x%x

` , header . Version , header . G1 , header . Toc , header . Cluster , header . Process , int ( header . Flag ) ) ; err != nil { return err } return writeComponents ( w , header , tocs , metrics , values , instances , indoms , strings ) }
Write creates a writable representation of a MMV dump
and writes it to the passed writer.
Write creates a writable representation of a MMV dump and writes it to the passed writer .