init

package
v2.0.0-...-6878c7e Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: CC0-1.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfigCreator

func DefaultConfigCreator(_ *cobra.Command) config.Config

DefaultConfigCreator represents the default configuration creator that builds a Config instance using the values specified using the default flags.

func InitCmd

func InitCmd(cfg *Config) *cobra.Command

InitCmd returns the command that should be run in order to properly initialize BDJuno

Types

type Config

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

Config contains the configuration data for the init command

func NewConfig

func NewConfig() *Config

NewConfig allows to build a new Config instance

func (*Config) GetConfigCreator

func (c *Config) GetConfigCreator() ConfigCreator

GetConfigCreator return the function that should be run to create a configuration from a set of flags specified by the user with the "init" command

func (*Config) WithConfigCreator

func (c *Config) WithConfigCreator(creator ConfigCreator) *Config

WithConfigCreator sets the given setup function as the configuration creator

type ConfigCreator

type ConfigCreator = func(cmd *cobra.Command) config.Config

ConfigCreator represents a function that builds a Config instance from the flags that have been specified by the user inside the given command.

Jump to

Keyboard shortcuts

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