delve/_scripts/gen-cli-docs.go
Alessandro Arzilli c412dcdc4f
*: run go1.19 'go fmt' on everything and fix problems (#3031)
Go 1.19 also formats doc comments according to the new godoc syntax.
Some of our comments, especially unexported symbols did not conform to
the godoc syntax and therefore are mangled by 'go fmt'.

This PR runs 'go fmt' from go1.19 on everything and manually fixes the
problems.

See also:
	https://github.com/golang/proposal/blob/master/design/51082-godocfmt.md
2022-06-17 10:08:11 -07:00

27 lines
415 B
Go

//go:build ignore
// +build ignore
package main
import (
"bufio"
"log"
"os"
"github.com/go-delve/delve/pkg/terminal"
)
func main() {
fh, err := os.Create(os.ExpandEnv("./Documentation/cli/README.md"))
if err != nil {
log.Fatalf("could not create README.md: %v", err)
}
defer fh.Close()
w := bufio.NewWriter(fh)
defer w.Flush()
commands := terminal.DebugCommands(nil)
commands.WriteMarkdown(w)
}