config

package
v0.5.37 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatValue

func FormatValue(value interface{}) string

Helper function to format config values for display

func GetDefaultConfigPath

func GetDefaultConfigPath(appName string) (string, error)

GetDefaultConfigPath is updated to take an appName parameter

Types

type ConfigCommand

type ConfigCommand struct {
	*cobra.Command
	// contains filtered or unexported fields
}

func NewConfigCommand

func NewConfigCommand(appName string) (*ConfigCommand, error)

type ConfigEditor

type ConfigEditor struct {
	// contains filtered or unexported fields
}

func NewAppConfigEditor

func NewAppConfigEditor(appName string, configPath string) (*ConfigEditor, error)

NewAppConfigEditor creates a new ConfigEditor for a specific application

func NewConfigEditor

func NewConfigEditor(path string) (*ConfigEditor, error)

NewConfigEditor creates a new ConfigEditor with a specific path

func (*ConfigEditor) Delete

func (c *ConfigEditor) Delete(key string) error

func (*ConfigEditor) Get

func (c *ConfigEditor) Get(key string) (interface{}, error)

func (*ConfigEditor) GetAll

func (c *ConfigEditor) GetAll() map[string]interface{}

func (*ConfigEditor) ListKeys

func (c *ConfigEditor) ListKeys() []string

func (*ConfigEditor) Save

func (c *ConfigEditor) Save() error

func (*ConfigEditor) Set

func (c *ConfigEditor) Set(key string, value interface{}) error

Jump to

Keyboard shortcuts

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