cfg

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Save

func Save() error

func Sort

func Sort(r string, m map[string]any) (ms yaml.MapSlice)

Types

type Account

type Account interface {
	GetKey() string
}

type Accounts

type Accounts[T Account] []T

func (Accounts[Account]) Add

func (accounts Accounts[Account]) Add(account Account) Accounts[Account]

func (Accounts[Account]) Get

func (accounts Accounts[Account]) Get(key string) (account Account, _ bool)

func (Accounts[Account]) GetOrFirst

func (accounts Accounts[Account]) GetOrFirst(keys ...string) Account

func (Accounts[Account]) Update

func (accounts Accounts[Account]) Update(key string, cb func(account Account) Account) Accounts[Account]

Jump to

Keyboard shortcuts

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