delve/scripts/gen-cli-docs.go
Alessandro Arzilli 82ece54737 docs: Documentation for command line frontend (#518)
* documentation: copied old documentation from wiki

* command: better online documentation

Help without arguments prints just a short summary for each command,
help followed by a command prints the command's syntax and a longer
explanation.

* documentation: automatically generate Documentation/cli/README.md
2016-04-29 11:58:19 -07:00

24 lines
417 B
Go

package main
import (
"bufio"
"log"
"os"
"github.com/derekparker/delve/terminal"
)
func main() {
fh, err := os.Create(os.ExpandEnv("$GOPATH/src/github.com/derekparker/delve/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)
}