jcfg

package module
v0.0.0-...-2c634d5 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

README

jcfg

easy to use config library

OS Supported
Windows yes
Linux yes
OS X not yet

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultConfigFolderPath

func GetDefaultConfigFolderPath(appName string) string

Types

type Config

type Config struct {
	KV map[string]any
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig() Config

func (*Config) Decode

func (c *Config) Decode(r io.Reader) error

func (*Config) Encode

func (c *Config) Encode(w io.Writer) error

func (*Config) Get

func (c *Config) Get(key string) any

func (*Config) Has

func (c *Config) Has(key string) bool

func (*Config) Set

func (c *Config) Set(key string, val any)

func (*Config) SetDecoder

func (c *Config) SetDecoder(decode func(data []byte, v any) error)

func (*Config) SetEncoder

func (c *Config) SetEncoder(encode func(v any) ([]byte, error))

Jump to

Keyboard shortcuts

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