preparers

package
v0.1.64 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyAliases

func ApplyAliases(ctx context.Context) (context.Context, error)

ApplyAliases consolidates flags with aliases into a single source-of-truth flag. After calling this, the main flags will have their values set as follows:

  • If the main flag was already set, it will keep its value.
  • If it was not set, but an alias was, it will take the value of the first specified alias flag. This will set flag.Changed to true, as if it were specified manually.
  • If none of the flags were set, the main flag will remain its default value.

func DetermineConfigDir

func DetermineConfigDir(ctx context.Context) (context.Context, error)

func DetermineUserHomeDir

func DetermineUserHomeDir(ctx context.Context) (context.Context, error)

func InitClient

func InitClient(ctx context.Context) (context.Context, error)

func LoadConfig

func LoadConfig(ctx context.Context) (context.Context, error)

Types

type Preparer

type Preparer func(context.Context) (context.Context, error)

Jump to

Keyboard shortcuts

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