Skip to content

Commit

Permalink
cmd/geth: update template for 'geth bug' command (#16350)
Browse files Browse the repository at this point in the history
  • Loading branch information
niuzhenguo authored and fjl committed Apr 6, 2018
1 parent 50dbe8e commit c43792a
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions cmd/geth/bugcmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,17 @@ func reportBug(ctx *cli.Context) error {
// execute template and write contents to buff
var buff bytes.Buffer

fmt.Fprintln(&buff, header)
fmt.Fprintln(&buff, "#### System information")
fmt.Fprintln(&buff)
fmt.Fprintln(&buff, "Version:", params.Version)
fmt.Fprintln(&buff, "Go Version:", runtime.Version())
fmt.Fprintln(&buff, "OS:", runtime.GOOS)
printOSDetails(&buff)
fmt.Fprintln(&buff, header)

// open a new GH issue
if !browser.Open(issueUrl + "?body=" + url.QueryEscape(buff.String())) {
fmt.Printf("Please file a new issue at %s using this template:\n%s", issueUrl, buff.String())
fmt.Printf("Please file a new issue at %s using this template:\n\n%s", issueUrl, buff.String())
}
return nil
}
Expand Down Expand Up @@ -97,13 +99,15 @@ func printCmdOut(w io.Writer, prefix, path string, args ...string) {
fmt.Fprintf(w, "%s%s\n", prefix, bytes.TrimSpace(out))
}

const header = `Please answer these questions before submitting your issue. Thanks!
const header = `
#### Expected behaviour
#### Actual behaviour
#### Steps to reproduce the behaviour
#### What did you do?
#### What did you expect to see?
#### What did you see instead?
#### System details
#### Backtrace
`

0 comments on commit c43792a

Please sign in to comment.