data

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadCSV

func LoadCSV(path string) ([]map[string]string, error)

LoadCSV loads a CSV file and returns an array of maps (header row = keys).

func LoadDirectory

func LoadDirectory(dir string) (map[string]interface{}, error)

LoadDirectory loads all data files from a directory, keyed by filename stem. Returns an error if two files share a stem name (e.g., team.csv and team.yaml).

func LoadExternalFiles

func LoadExternalFiles(files map[string]string, projectRoot string) (map[string]interface{}, error)

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

func LoadFile(path string) (map[string]interface{}, error)

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

func LoadFileAny(path string) (interface{}, error)

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.

Jump to

Keyboard shortcuts

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