config

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DevCliVersion = "dev"
View Source
const GlobalConfigFileName = "config"

The GlobalConfigFileName is the file name without the file extension.

View Source
const LocalDirConfigFileName = ".imposter"

The LocalDirConfigFileName is the file name without the file extension.

Variables

View Source
var (
	Config  CliConfig
	DirPath string
)

Functions

func ContainsConfigFile

func ContainsConfigFile(configDir string, recursive bool) bool

ContainsConfigFile determines if the specified configDir contains a file match the expected naming format

func GetGlobalConfigDir

func GetGlobalConfigDir() (string, error)

func MergeCliConfigIfExists

func MergeCliConfigIfExists(configDir string)

func SetCliConfig

func SetCliConfig(logLevel string)

func ValidateConfigExists

func ValidateConfigExists(configDir string, scaffoldMissing bool) error

func WriteLocalConfigValue

func WriteLocalConfigValue(configDir string, key string, value string) error

Types

type CliConfig

type CliConfig struct {
	Version  string
	LogLevel string
}

type ConfigPair

type ConfigPair struct {
	Key   string
	Value string
}

func ParseConfig

func ParseConfig(args []string) []ConfigPair

Jump to

Keyboard shortcuts

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