configcmd

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package configcmd provides lango config get/set/keys subcommands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfigCmd

func NewConfigCmd(bootLoader func() (*bootstrap.Result, error)) *cobra.Command

NewConfigCmd creates the "config" parent command with all profile subcommands. bootLoader is called to obtain the bootstrap result (DB + crypto + config). The caller wires get/set/keys subcommands separately if needed.

func NewGetCmd

func NewGetCmd(cfgLoader func() (*config.Config, error)) *cobra.Command

NewGetCmd creates the "config get <dot.path>" command.

func NewKeysCmd

func NewKeysCmd() *cobra.Command

NewKeysCmd creates the "config keys [prefix]" command.

func NewSetCmd

func NewSetCmd(
	cfgLoader func() (*config.Config, func(), error),
	cfgSaver func(*config.Config) error,
) *cobra.Command

NewSetCmd creates the "config set <dot.path> <value>" command. The passphrase is implicitly verified via bootstrap (caller must bootstrap first). cfgLoader returns (config, cleanup, error). cleanup closes bootstrap resources and is called via defer in RunE so resources are released on all code paths.

Types

This section is empty.

Jump to

Keyboard shortcuts

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