INNER CODE UNIT · Go
gopherdata/gophernotes · display.go:434
func PDF(pdf []byte) Data {
return MakeData(MIMETypePDF, pdf)
}
func PNG(png []byte) Data {
return MakeData(MIMETypePNG, png)
}
func SVG(svg string) Data {
return MakeData(MIMETypeSVG, svg)
}
// MIME encapsulates the data and metadata into a Data.
// The 'data' map is expected to contain at least one {key,value} pair,
// with value being a string, []byte or some other JSON serializable representation,
// and key equal to the MIME type of such value.
// The exact structure of value is determined by what the frontend expects.
// Some easier-to-use functions for common formats supported by the Jupyter frontend