mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
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`.
14 lines
272 B
Go
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```"
|
|
}
|