config

package
v2.35.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ScwConfigPathEnv = "SCW_CLI_CONFIG_PATH"

	DefaultConfigFileName = "cli.yaml"

	DefaultOutput = "human"
)

Variables

This section is empty.

Functions

func FilePath

func FilePath() (string, error)

func GetDefaultEditor added in v2.14.0

func GetDefaultEditor() string

func GetSystemDefaultEditor added in v2.14.0

func GetSystemDefaultEditor() string

Types

type Config

type Config struct {
	Alias  *alias.Config `json:"alias"  yaml:"alias"`
	Output string        `json:"output" yaml:"output"`
	// contains filtered or unexported fields
}

func LoadConfig

func LoadConfig(configPath string) (*Config, error)

LoadConfig tries to load config file returns a new empty config if file doesn't exist return error if fail to load config file

func (*Config) HumanConfig added in v2.15.0

func (c *Config) HumanConfig() (string, error)

HumanConfig will generate a config file with documented arguments

func (*Config) Save

func (c *Config) Save() error

Save marshal config to config file

Jump to

Keyboard shortcuts

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