Markdown Panel Builder#
Constructor#
import "github.com/perses/perses/go-sdk/panel/markdown"
var options []markdown.Option
markdown.Markdown("My super markdown **text**", options...)
Need to provide a text and a list of options.
Default options#
- Text(): with the text provided in the constructor
Available options#
Text#
Define the markdown text of the panel.
NewLine#
Add a new line to the markdown text.
Example#
package main
import (
"github.com/perses/perses/go-sdk/dashboard"
panelgroup "github.com/perses/perses/go-sdk/panel-group"
"github.com/perses/perses/go-sdk/panel/markdown"
)
func main() {
dashboard.New("Example Dashboard",
dashboard.AddPanelGroup("Resource usage",
panelgroup.AddPanel("Container memory",
markdown.Markdown("This is a markdown panel",
markdown.NewLine("This is a new line"),
markdown.NewLine("This is a new line"),
markdown.NewLine("This is a new line"),
markdown.NewLine("This is a new line"),
markdown.NewLine("This is a new line"),
markdown.NewLine("This is a new line"),
),
),
),
)
}