config

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: BSD-3-Clause-Clear Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveConfig

func SaveConfig(configPath string, cfg *Config) error

Types

type Config

type Config struct {
	ActiveContext string `yaml:"active_context"`
	Contexts      map[string]Context
}

func LoadConfig

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

LoadConfig loads the CLI configuration from the path. If the path is empty, it uses the default config path.

func (*Config) GetContext

func (c *Config) GetContext(name string) (*Context, error)

GetContext retrieves the context by name. If name is empty, it returns the configured active context.

type Context

type Context struct {
	URL   string
	Token string
}

Jump to

Keyboard shortcuts

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