Documentation
¶
Index ¶
- func LoadCSV(path string) ([]map[string]string, error)
- func LoadDirectory(dir string) (map[string]interface{}, error)
- func LoadExternalFiles(files map[string]string, projectRoot string) (map[string]interface{}, error)
- func LoadFile(path string) (map[string]interface{}, error)
- func LoadFileAny(path string) (interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadDirectory ¶
LoadDirectory loads all data files from a directory, keyed by filename stem. Subdirectories are recursed into and produce nested namespace maps: data/nav/main.yaml → result["nav"]["main"]. Returns an error if two files share a stem name (e.g., team.csv and team.yaml) or if a file and subdirectory share the same stem (e.g., nav.yaml and nav/).
func LoadExternalFiles ¶
LoadExternalFiles loads individual data files by key→path mapping. Paths must be relative and are resolved against projectRoot. Keys are processed in sorted order for deterministic error reporting.
func LoadFile ¶
LoadFile loads a single data file (YAML, TOML, JSON) and returns its contents as a map. For files with root-level arrays, use LoadFileAny instead.
func LoadFileAny ¶
LoadFileAny loads a single data file (YAML, TOML, JSON) and returns its contents. Unlike LoadFile, it supports both root-level maps and root-level arrays.
Types ¶
This section is empty.