Ghissue
๐ฆ Go library that enables your users to submit error reports to GitHub
Install / Use
/learn @atomicgo/GhissueREADME
<p align="center"> <strong><a href="https://pkg.go.dev/atomicgo.dev/ghissue#section-documentation" target="_blank">Documentation</a></strong> | <strong><a href="https://github.com/atomicgo/atomicgo/blob/main/CONTRIBUTING.md" target="_blank">Contributing</a></strong> | <strong><a href="https://github.com/atomicgo/atomicgo/blob/main/CODE_OF_CONDUCT.md" target="_blank">Code of Conduct</a></strong> </p>
<p align="center"> <img src="https://raw.githubusercontent.com/atomicgo/atomicgo/main/assets/header.png" alt="AtomicGo"> </p> <p align="center"> <table> <tbody> </tbody> </table> </p> <h3 align="center"><pre>go get atomicgo.dev/ghissue</pre></h3> <p align="center"> <table> <tbody> </tbody> </table> </p> <!-- gomarkdoc:embed:start --> <!-- Code generated by gomarkdoc. DO NOT EDIT -->
ghissue
import "atomicgo.dev/ghissue"
Package ghissue enables your users to submit issues to GitHub directly.

Example:
repo := ghissue.NewRepository("atomicgo", "ghissue")
// [...]
err := errors.New("This is an error")
repo.CreateErrorReport(err) // Only creates an error report if the error is not nil
Index
Variables
<a name="ErrOpenBrowser"></a>ErrOpenBrowser is the error returned when opening the browser fails.
var ErrOpenBrowser = errors.New("failed to open browser")
<a name="Issue"></a>
type Issue
Issue is a GitHub issue.
type Issue struct {
Repository Repository
Title string
Body string
}
<a name="NewIssue"></a>
func NewIssue
func NewIssue(repo Repository, title, body string) Issue
NewIssue creates a new issue.
<a name="Issue.GetCreateURL"></a>
func (Issue) GetCreateURL
func (issue Issue) GetCreateURL() string
GetCreateURL returns the URL to create an issue.
<a name="Issue.Open"></a>
func (Issue) Open
func (issue Issue) Open() error
Open opens the "create issue" menu on GitHub in the browser.
<a name="Repository"></a>
type Repository
Repository is a GitHub repository.
type Repository struct {
Owner string
Name string
}
<a name="NewRepository"></a>
func NewRepository
func NewRepository(owner, name string) Repository
NewRepository creates a new Repository from an owner and repository name.
<a name="Repository.CreateErrorReport"></a>
func (Repository) CreateErrorReport
func (repo Repository) CreateErrorReport(err error) error
CreateErrorReport creates a new issue on GitHub with a detailed error report including the stack trace.
Example:
repo := ghissue.NewRepository("atomicgo", "ghissue")
// [...]
err := errors.New("This is an error")
repo.CreateErrorReport(err)
<a name="Repository.NewIssue"></a>
func (Repository) NewIssue
func (repo Repository) NewIssue(title, body string) Issue
NewIssue creates a new issue with a title and body.
<a name="Repository.String"></a>
func (Repository) String
func (repo Repository) String() string
String returns the string representation of the repository.
Generated by gomarkdoc
<!-- gomarkdoc:embed:end -->AtomicGo.dev ย ยทย with โค๏ธ by @MarvinJWendt | MarvinJWendt.com
