config

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigDir

func ConfigDir() string

ConfigDir returns the configuration directory for bb. Uses XDG_CONFIG_HOME if set, otherwise ~/.config/bb/

func ConfigFilePath

func ConfigFilePath() string

ConfigFilePath returns the full path to the config file.

func CredentialsFilePath

func CredentialsFilePath() string

CredentialsFilePath returns the full path to the credentials file.

func EnsureConfigDir

func EnsureConfigDir() error

EnsureConfigDir creates the config directory if it doesn't exist.

func StateFilePath added in v0.0.7

func StateFilePath() string

StateFilePath returns the full path to the state file.

Types

type Config

type Config struct {
	DefaultWorkspace string `yaml:"default_workspace,omitempty"`
	DefaultFormat    string `yaml:"default_format,omitempty"` // "table" or "json"
	Editor           string `yaml:"editor,omitempty"`
}

Config holds the application configuration.

func Load

func Load() (*Config, error)

Load reads the config from disk. Returns default config if file doesn't exist.

func (*Config) Save

func (c *Config) Save() error

Save writes the config to disk.

Jump to

Keyboard shortcuts

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