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

config

package
v1.202544.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AspectSystemConfigFolder = "/etc/aspect/cli" // for linux & darwin
	AspectConfigFolder       = ".aspect/cli"
	AspectConfigFile         = "config.yaml"
)

Variables

This section is empty.

Functions

func AddPlugins

func AddPlugins(plugins []types.PluginConfig, new []types.PluginConfig) ([]types.PluginConfig, error)

func AspectBaseUrl

func AspectBaseUrl() string

func HomeConfigFile

func HomeConfigFile() (string, error)

func HomeConfigFolder

func HomeConfigFolder() (string, error)

func Load

func Load(v *viper.Viper, args []string) error

func LoadConfigFile

func LoadConfigFile(f string) (*viper.Viper, error)

Load a config file and fail if it is not found

func LoadHomeConfig

func LoadHomeConfig() (*viper.Viper, error)

func LoadSystemConfig

func LoadSystemConfig() (*viper.Viper, error)

func LoadWorkspaceConfig

func LoadWorkspaceConfig() (*viper.Viper, error)

func MarshalPluginConfig

func MarshalPluginConfig(plugins []types.PluginConfig) interface{}

func MaybeLoadConfigFile

func MaybeLoadConfigFile(f string) (*viper.Viper, error)

Load a config file if it is found

func SetInHomeConfig

func SetInHomeConfig(key string, value interface{}) (string, bool, error)

Sets a value in the Aspect CLI $HOME configuration. Returns the path of the config file written to & true if the configuration file is newly created.

func SetInWorkspaceConfig

func SetInWorkspaceConfig(key string, value interface{}) (string, bool, error)

Sets a value in the Aspect CLI $WORKSPACE configuration. Returns the path of the config file written to & true if the configuration file is newly created.

func SystemConfigFile

func SystemConfigFile() string

func UnmarshalPluginConfig

func UnmarshalPluginConfig(pluginsConfig interface{}) ([]types.PluginConfig, error)

func WorkspaceConfigFile

func WorkspaceConfigFile() (string, error)

func WorkspaceConfigFolder

func WorkspaceConfigFolder() (string, error)

func Write

func Write(v *viper.Viper) error

Types

type ConfigFlagValues

type ConfigFlagValues struct {
	UserConfigs     []string
	SystemConfig    bool
	WorkspaceConfig bool
	HomeConfig      bool
}

func ParseConfigFlags

func ParseConfigFlags(args []string) (*ConfigFlagValues, error)

Jump to

Keyboard shortcuts

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