bugreport

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildIssueURL

func BuildIssueURL(info Info) string

BuildIssueURL constructs a pre-filled GitHub issue URL.

func BuildPanicIssueURL

func BuildPanicIssueURL(info Info, panicVal any, stack []byte) string

BuildPanicIssueURL constructs a GitHub issue URL pre-filled with crash details.

func FormatText

func FormatText(info Info) string

FormatText formats the diagnostic info as a human-readable string.

func HandlePanic

func HandlePanic(f *cmdutil.Factory, version string, recovered any)

HandlePanic prints a friendly crash message and a pre-filled GitHub issue URL. Call this from a deferred recover() in main.

func NewCmd

func NewCmd(f *cmdutil.Factory, version string) *cli.Command

NewCmd creates the bug-report command.

Types

type Info

type Info struct {
	CLIVersion  string `json:"cli_version"`
	GoVersion   string `json:"go_version"`
	OS          string `json:"os"`
	Arch        string `json:"arch"`
	ConfigPath  string `json:"config_path"`
	ConfigFound bool   `json:"config_found"`
	Domain      string `json:"domain,omitempty"`
	APIStatus   string `json:"api_status,omitempty"`
}

Info holds the diagnostic information collected by the bug-report command.

func Collect

func Collect(f *cmdutil.Factory, version string) Info

Collect gathers diagnostic information from the environment.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL