From 80f146ae36e5254db198c518ee95d810fedbb213 Mon Sep 17 00:00:00 2001 From: Zhenguo Niu Date: Tue, 20 Mar 2018 13:00:27 +0800 Subject: [PATCH] cmd/geth: updated issue template for 'geth bug' command Updated to use go-ethereum's own issue template instead of golang's. --- cmd/geth/bugcmd.go | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/cmd/geth/bugcmd.go b/cmd/geth/bugcmd.go index ce9dbe6c0a..116e72ee8c 100644 --- a/cmd/geth/bugcmd.go +++ b/cmd/geth/bugcmd.go @@ -49,15 +49,16 @@ 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\n") 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 } @@ -97,13 +98,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 -#### What did you do? - -#### What did you expect to see? - -#### What did you see instead? - -#### System details + +#### Actual behaviour + + +#### Steps to reproduce the behaviour + + +#### Backtrace `