Пример #1
0
func reportTitleAndBody(reportedError error, stack string) (title, body string, err error) {
	errType := reflect.TypeOf(reportedError).String()
	message := fmt.Sprintf(
		crashReportTmpl,
		reportedError,
		errType,
		reportedError,
		stack,
		runtimeInfo(),
		version.FullVersion(),
	)

	editor, err := NewEditor("CRASH_REPORT", "crash report", message)
	if err != nil {
		return "", "", err
	}

	defer editor.DeleteFile()

	return editor.EditTitleAndBody()
}
Пример #2
0
func runVersion(cmd *Command, args *Args) {
	ui.Println(version.FullVersion())
	os.Exit(0)
}
Пример #3
0
func runVersion(cmd *Command, args *Args) {
	ui.Println(version.FullVersion())
	args.NoForward()
}