github.com/cnboonhan/delve@v0.0.0-20230908061759-363f2388c2fb/_scripts/gen-cli-docs.go (about) 1 //go:build ignore 2 // +build ignore 3 4 package main 5 6 import ( 7 "bufio" 8 "log" 9 "os" 10 11 "github.com/go-delve/delve/pkg/terminal" 12 ) 13 14 func main() { 15 fh, err := os.Create(os.ExpandEnv("./Documentation/cli/README.md")) 16 if err != nil { 17 log.Fatalf("could not create README.md: %v", err) 18 } 19 defer fh.Close() 20 21 w := bufio.NewWriter(fh) 22 defer w.Flush() 23 24 commands := terminal.DebugCommands(nil) 25 commands.WriteMarkdown(w) 26 }