refopts

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewShowRefGrouper

func NewShowRefGrouper(rg sizes.RefGrouper, w io.Writer) sizes.RefGrouper

Return a `sizes.RefGrouper` that wraps its argument and behaves like it except that it also logs its decisions to an `io.Writer`.

Types

type Configger

type Configger interface {
	GetConfig(prefix string) (*git.Config, error)
}

Configger is an abstraction for a thing that can read gitconfig.

type RefGroupBuilder

type RefGroupBuilder struct {
	// contains filtered or unexported fields
}

RefGroupBuilder handles reference-related options and puts together a `sizes.RefGrouper` to be used by the main part of the program.

func NewRefGroupBuilder

func NewRefGroupBuilder(configger Configger) (*RefGroupBuilder, error)

NewRefGroupBuilder creates and returns a `RefGroupBuilder` instance.

func (*RefGroupBuilder) AddRefopts

func (rgb *RefGroupBuilder) AddRefopts(flags *pflag.FlagSet)

AddRefopts adds the reference-related options to `flags`.

func (*RefGroupBuilder) Finish

func (rgb *RefGroupBuilder) Finish() (sizes.RefGrouper, error)

Finish collects the information gained from processing the options and returns a `sizes.RefGrouper`.

Jump to

Keyboard shortcuts

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