delve/scripts/gen-cli-docs.go
Hyang-Ah Hana Kim ab7367ed2b Minor fixes to make some tests build and run (#752)
* cmd/dlv: fall back to go env GOPATH when GOPATH envvar is unset.

Since Go 1.8, GOPATH environment variable has a default value if the
environment variable is unset so not setting GOPATH is perfectly ok.
Depend on `go env` command to query Go related environment variable.

* build: update references to moved packages
2017-03-13 10:59:34 -07:00

24 lines
421 B
Go

package main
import (
"bufio"
"log"
"os"
"github.com/derekparker/delve/pkg/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)
}