Documentation
¶
Overview ¶
Package userconfig stores bitbottle user preferences in ~/.config/bitbottle/config.yml.
This is intentionally distinct from internal/config (which manages auth state in hosts.yml). User preferences cover editor/pager/browser/git_protocol/prompt and may be scoped per-host.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AllowedKeys = []string{
"editor",
"pager",
"browser",
"git_protocol",
"prompt",
}
AllowedKeys is the set of keys writable via `bitbottle config set`. This allowlist ensures users get immediate feedback on typos rather than silently writing a key the CLI never reads back.
var PerHostKeys = []string{
"git_protocol",
}
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config is a thread-safe handle to the user preferences file.
func (*Config) Get ¶
Get returns (value, true) when key is set. Per-host lookup falls back to the global value when no host-specific override exists.
func (*Config) List ¶
List returns all set keys in deterministic order: globals (sorted), then per-host entries (sorted by host, then by key).