output

package
v0.3.10 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: MIT Imports: 9 Imported by: 0

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 Format

type Format string

Format controls high-level output formatting.

const (
	FormatJSON   Format = "json"
	FormatSimple Format = "simple"
	FormatTable  Format = "table"
)

func ParseFormat

func ParseFormat(raw string) (Format, error)

ParseFormat validates a string format value.

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.

func (*IssueListPrinter) Print

func (p *IssueListPrinter) Print(w io.Writer, issues []api.Issue) error

Print renders an issue list according to the printer options.

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

Jump to

Keyboard shortcuts

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