Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatFlexibleTime ¶
func FormatFlexibleTime(t api.FlexibleTime, format TimeFormat) string
FormatFlexibleTime renders a FlexibleTime using the requested display style.
func FormatTime ¶
func FormatTime(t time.Time, format TimeFormat) string
FormatTime renders a time using the requested display style.
Types ¶
type IssueListOptions ¶
type IssueListOptions struct {
Format Format
TimeFormat TimeFormat
Template string
Color *iostreams.ColorScheme
}
IssueListOptions configures issue list text output.
type IssueListPrinter ¶
type IssueListPrinter struct {
// contains filtered or unexported fields
}
IssueListPrinter renders issues for text and template outputs.
func NewIssueListPrinter ¶
func NewIssueListPrinter(opts IssueListOptions) (*IssueListPrinter, error)
NewIssueListPrinter validates and returns a printer for issue lists.
type PRListOptions ¶
type PRListOptions struct {
Format Format
Color *iostreams.ColorScheme
}
PRListOptions configures PR list text output.
type PRListPrinter ¶
type PRListPrinter struct {
// contains filtered or unexported fields
}
PRListPrinter renders pull request lists.
func NewPRListPrinter ¶
func NewPRListPrinter(opts PRListOptions) (*PRListPrinter, error)
NewPRListPrinter validates and returns a PR printer.
func (*PRListPrinter) Print ¶
func (p *PRListPrinter) Print(w io.Writer, prs []api.PullRequest) error
Print renders PRs according to the configured format.
type RepoListOptions ¶
type RepoListOptions struct {
Format Format
}
RepoListOptions configures repo list text output.
type RepoListPrinter ¶
type RepoListPrinter struct {
// contains filtered or unexported fields
}
RepoListPrinter renders repository lists.
func NewRepoListPrinter ¶
func NewRepoListPrinter(opts RepoListOptions) (*RepoListPrinter, error)
NewRepoListPrinter validates and returns a repository printer.
func (*RepoListPrinter) Print ¶
func (p *RepoListPrinter) Print(w io.Writer, repos []api.Repository) error
Print renders repositories according to the configured format.
type TimeFormat ¶
type TimeFormat string
TimeFormat controls how timestamps are rendered in text output.
const ( TimeFormatAbsolute TimeFormat = "absolute" TimeFormatRelative TimeFormat = "relative" )
func ParseTimeFormat ¶
func ParseTimeFormat(raw string) (TimeFormat, error)
ParseTimeFormat validates a string time-format value.
Source Files
¶
- format.go
- issues.go
- prs.go
- repos.go
- time.go