INNER CODE UNIT · Go
generateBlockMarkdown
grafana-cold-storage/phlare · tools/doc-generator/main.go:100
func generateBlockMarkdown(blocks []*parse.ConfigBlock, blockName, fieldName string) string {
// Look for the requested block.
for _, block := range blocks {
if block.Name != blockName {
continue
}
md := &markdownWriter{}
// Wrap the root block with another block, so that we can show the name of the
// root field containing the block specs.
md.writeConfigBlock(&parse.ConfigBlock{
Name: blockName,
Desc: block.Desc,
Entries: []*parse.ConfigEntry{
{
Kind: parse.KindBlock,
Name: fieldName,