config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Filename = ".cligen.yaml"
	Dir      = "~/.config"
)

Variables

This section is empty.

Functions

func GetConfigPath

func GetConfigPath() (string, error)

Types

type Config

type Config struct {
	HomebrewConfig HomebrewConfig `yaml:"homebrew"`
}

Config represents the configuration of cligen.

func LoadConfig

func LoadConfig() (*Config, error)

LoadConfig loads the config file from the default location and returns a Config instance. If the config file doesn't exist, it returns a Config instance with default values. If the config file exists but cannot be read, it returns an error. If the config file exists but cannot be parsed, it returns an error.

func NewConfig

func NewConfig() *Config

NewConfig creates a new Config instance with default values

func (*Config) SaveConfig

func (c *Config) SaveConfig() error

type HomebrewConfig

type HomebrewConfig struct {
	Enabled        bool   `yaml:"enabled"`
	Repo           string `yaml:"repo"`
	GithubUsername string `yaml:"github_username"`
}

HomebrewConfig represents the configuration of the Homebrew tap.

Jump to

Keyboard shortcuts

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