code: func WriteManifest(outputWriter *tar.Writer, manifest schema.ImageManifest) error {
  	b, err := json.Marshal(manifest)
  	if err != nil {
  		return err
  	}
  
  	hdr := getGenericTarHeader()
  	hdr.Name = "manifest"
  	hdr.Mode = 0644
  	hdr.Size = int64(len(b))
  	hdr.Typeflag = tar.TypeReg
  
  	if err := outputWriter.WriteHeader(hdr); err != nil {
  		return err
  	}
  	if _, err := outputWriter.Write(b); err != nil {
  		return err
  	}
  
  	return nil
  }
docs: // WriteManifest writes a schema.ImageManifest entry on a tar.Writer.