Documentation ¶
Index ¶
- func GitRepository(ctx context.Context) *git.Repository
- func SetupGerritAPI(ctx context.Context) (context.Context, error)
- func SetupGitRepository(ctx context.Context) (context.Context, error)
- func SetupProject(ctx context.Context) (context.Context, error)
- func SetupTableWriter(ctx context.Context, out io.Writer) context.Context
- func TableWriter(ctx context.Context) *tablewriter.Table
- func WriteRow(table *tablewriter.Table, v interface{})
- type Gerrit
- type ProjectID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GitRepository ¶
GitRepository extracts the git repository from the context.
func SetupGerritAPI ¶
SetupGerritAPI sets up the gerrit API to be shared across multiple commands.
func SetupGitRepository ¶
SetupGitRepository opens the current repository.
func SetupProject ¶
SetupProject detects and configures the current ProjectID
func SetupTableWriter ¶
SetupTableWriter creates a new table writer and appends it to the context.
func TableWriter ¶
func TableWriter(ctx context.Context) *tablewriter.Table
TableWriter obtains a tablewriter.Table from the provided context.
func WriteRow ¶
func WriteRow(table *tablewriter.Table, v interface{})
WriteRow using golang reflection to get column names from the provided structure.
Types ¶
Click to show internal directories.
Click to hide internal directories.