go-ethereum/internal/cli/markdown.go
Jerry a131e427f6 Automatically generate markdown pages from bor CLI
Adding a script that can automatically generate markdown pages from bor
CLI, so we can avoid copy-pasting helper strings whenever a flag is created,
deleted, or modified.

CLI docs could be generated with command `make docs`.
2022-05-09 17:10:36 +02:00

14 lines
272 B
Go

package cli
import (
"strings"
)
type MarkDown interface {
MarkDown() string
}
// Create a Markdown code block from a slice of string, where each string is a line of code
func CodeBlock(lines []string) string {
return "```\n" + strings.Join(lines, "\n") + "\n```"
}