Versions in this module Expand all Collapse all v1 v1.3.0 Jul 21, 2025 v1.2.0 Jul 9, 2025 Changes in this version + var ErrConfigAlreadyLoaded = errors.New("configuration already loaded at this path") + var ErrConfigAlreadyLoadedInvalidType = errors.New("configuration already loading at this path has an invalid type") + var ErrConfigFailedToBindFlags = errors.New("failed to bind flags") + var ErrConfigMarshal = errors.New("failed to marshal configuration") + var ErrConfigNil = errors.New("configuration cannot be nil") + var ErrConfigNotFound = errors.New("configuration file not found at the specified path") + var ErrConfigRead = errors.New("failed to read configuration file") + var ErrConfigSave = errors.New("failed to save configuration file") + var ErrConfigUnmarshal = errors.New("failed to unmarshal configuration") + var ErrConfigValidation = errors.New("configuration validation failed") + var ErrConfigWrite = errors.New("failed to write configuration file") + func WrapError(err error, msg string) error + type BaseConfigManager struct + func NewConfigManager[T any](path string, initial *T, options ...WithOption) *BaseConfigManager[T] + func (m *BaseConfigManager[T]) Init() error + func (m *BaseConfigManager[T]) IsFound() bool + func (m *BaseConfigManager[T]) Load(validate bool) (*T, error) + func (m *BaseConfigManager[T]) Save(config *T, validate bool) error + type MoleyError struct + Err error + Msg string + Op string + func (e *MoleyError) Error() string + func (e *MoleyError) Unwrap() error + type WithOption = func(*viper.Viper) error + func WithBindEnv(prefix string) WithOption + func WithBindFlags(cmd *cobra.Command) WithOption Other modules containing this package github.com/stupside/moley/v2