Documentation | Contributing | Code of Conduct
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
ErrOpenBrowser is the error returned when opening the browser fails.
var ErrOpenBrowser = errors.New("failed to open browser")type Issue
Issue is a GitHub issue.
type Issue struct {
Repository Repository
Title string
Body string
}func NewIssue
func NewIssue(repo Repository, title, body string) IssueNewIssue creates a new issue.
func (Issue) GetCreateURL
func (issue Issue) GetCreateURL() stringGetCreateURL returns the URL to create an issue.
func (Issue) Open
func (issue Issue) Open() errorOpen opens the "create issue" menu on GitHub in the browser.
type Repository
Repository is a GitHub repository.
type Repository struct {
Owner string
Name string
}func NewRepository
func NewRepository(owner, name string) RepositoryNewRepository creates a new Repository from an owner and repository name.
func (Repository) CreateErrorReport
func (repo Repository) CreateErrorReport(err error) errorCreateErrorReport 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)
func (Repository) NewIssue
func (repo Repository) NewIssue(title, body string) IssueNewIssue creates a new issue with a title and body.
func (Repository) String
func (repo Repository) String() stringString returns the string representation of the repository.
Generated by gomarkdoc
AtomicGo.dev · with ❤️ by @MarvinJWendt | MarvinJWendt.com
