refopts

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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(defaultAll bool) (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