Help us shape the future of Go! Take the 2026 Go Developer Survey

flags

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package flags defines every command-line flag the outtake CLI accepts, one file per command. The commands under internal/cmd bind them and read the result; a flag that overrides configuration also applies that override to the loaded configuration, so no command repeats the rule.

Index

Constants

View Source
const (
	// FlagJSON outputs version information in JSON format.
	FlagJSON = "json"
	// FlagVerbose outputs multi-line detailed version information.
	FlagVerbose = "verbose"
)

The names of the version command flags.

View Source
const FlagListen = "listen"

FlagListen is the name of the listen address override.

Variables

This section is empty.

Functions

This section is empty.

Types

type Listen

type Listen struct {
	// Addr is the address the flag set carries, empty when it was not passed.
	Addr string
}

Listen is the address override the server commands share, applied over the configured listen address.

func (*Listen) Apply

func (listen *Listen) Apply(cfg *config.Config)

Apply overrides the configured listen address when the flag was passed.

Parameters:

  • cfg: Configuration to override.

func (*Listen) Bind

func (listen *Listen) Bind(flagSet *pflag.FlagSet)

Bind attaches the listen override to a flag set.

Parameters:

  • flagSet: The flag set to attach the override to.

type Version

type Version struct {
	// JSON reports whether the version is printed as JSON.
	JSON bool
	// Verbose reports whether the version is printed in detail.
	Verbose bool
}

Version are the flags for the version command.

func (*Version) Bind

func (version *Version) Bind(flagSet *pflag.FlagSet)

Bind attaches the version flags to a flag set.

Parameters:

  • flagSet: The flag set to attach the version flags to.

Jump to

Keyboard shortcuts

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