config

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package for configuration, provide basic config struct and utility to load.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProgramConfig

type ProgramConfig struct {
	Folder   folderConfig   `koanf:"default"`   // Config setting for folders
	Metadata metadataConfig `koanf:"metadata"`  // Config for metadata default values
	Database databaseConfig `koanf:"database"`  // Config for database to use
	TrashBin trashBinConfig `koanf:"trash-bin"` // Config of trash bin usage
}

Config for this program.

func Default

func Default() *ProgramConfig

Default config struct for this program.

func LoadYaml

func LoadYaml(path string) (*ProgramConfig, error)

Load yaml config from given path, while no koanf instance will preserved (i.e. every call overwrite previous call).

If failed to load config, then a default config will be returned.

Jump to

Keyboard shortcuts

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