okfconfig

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package okfconfig is the ONE okfctl configuration store: a flat JSON map at ~/.config/okfctl/config.json (override with OKFCTL_CONFIG_HOME). It is shared by core okfctl (the `config` command) and plugins (e.g. okfctl-search reads model_path from here), so there is a single config mechanism, not two. stdlib only — JSON, no TOML dependency (keeps okfctl zero-dependency).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load() (map[string]string, error)

Load reads the config map. A missing file is not an error — it returns an empty map so callers can treat "unset" and "empty" identically.

func Path

func Path() string

Path returns the config file location: $OKFCTL_CONFIG_HOME/config.json, else <user config dir>/okfctl/config.json, else ./.okfctl/config.json.

func Save

func Save(m map[string]string) error

Save writes the config map as indented JSON, creating the parent dir.

Types

This section is empty.

Jump to

Keyboard shortcuts

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