Documentation
¶
Index ¶
- type Loader
- func (l *Loader) ClearCache()
- func (l *Loader) Load(subPath string, target any) error
- func (l *Loader) LoadCached(subPath string, factory func() any) (any, error)
- func (l *Loader) LoadDir(subDir string, factory func(path string) (any, error)) (map[string]any, error)
- func (l *Loader) ReadFileWithFallback(path string) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Loader is a unified configuration loader for AI-related YAML files.
func (*Loader) ClearCache ¶
func (l *Loader) ClearCache()
ClearCache clears the configuration cache.
func (*Loader) LoadCached ¶
LoadCached loads a configuration with caching. If the file is already cached, returns the cached value. Otherwise, calls factory to create the target and caches it.
Click to show internal directories.
Click to hide internal directories.