config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 16 Imported by: 1 module, 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

View Source
const (
	// DefaultFilePerm keeps default permission model for created files.
	DefaultFilePerm = 0o640
	// DefaultDirPerm keeps default permission model for created directories.
	DefaultDirPerm = 0o750
)
View Source
const (
	// ConfigFlag is general config flag used for the app.
	// i.e. `--config`
	ConfigFlag = "config"

	OverwriteFlag         = "overwrite"
	OverwriteShortFlag    = ""
	OverwriteDefaultValue = false
)

Exportable cli arguments constants

Variables

This section is empty.

Functions

func DefaultConfig

func DefaultConfig() *v1alpha1.Config

DefaultConfig creates a v1alpha1.Config with defaulted values.

func DefaultConfigLocation

func DefaultConfigLocation() string

DefaultConfigLocation returns application config default location.

func DefaultVersionedConfig

func DefaultVersionedConfig() *v1alpha1.Config

DefaultVersionedConfig returns current version configuration object.

func FromContext

func FromContext(ctx context.Context) *v1alpha1.Config

FromContext returns the stored config or a default config.

func New

func New() *cobra.Command

New creates config main app object

func NewContext

func NewContext(ctx context.Context, config *v1alpha1.Config) context.Context

NewContext creates a context holding the config. Rebinding a context returned by NewContext retains its parent.

func NewContextWithCancel

func NewContextWithCancel(ctx context.Context, config *v1alpha1.Config) (context.Context, context.CancelFunc)

NewContextWithCancel creates a context with the config and a cancel function.

func NewInitCommand

func NewInitCommand() *cobra.Command

NewInitCommand configures `config init` command. It writes default configuration file.

func NewPrintCommand

func NewPrintCommand() *cobra.Command

NewPrintCommand prints configuration file contents to stdout.

func NewWhereCommand

func NewWhereCommand() *cobra.Command

NewWhereCommand returns configure `config where` command.

Types

This section is empty.

Jump to

Keyboard shortcuts

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