Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadCSV ¶
LoadCSV loads a slice of any struct type from a CSV file, using JSON tags for fields. - gets the header from the first line of the CSV file, maps the header to the struct fields - reads the CSV file and converts each row to a JSON string. - unmarshals the JSON string to a struct. - returns the slice of structs.
func SaveAsMarkdown ¶
func SaveAsMarkdown(input SaveAsMarkdownInput) error
func SaveOrAppendToCSV ¶
SaveOrAppendToCSV saves a slice of any struct type to a CSV file, using JSON tags for headers. - appends the data to the file if it already exists, or creates it if it doesn't exist. - writes the header based on the struct tags if the file is empty. - uses reflection to get the struct tags and write the header and data to the file.
Types ¶
type SaveAsMarkdownInput ¶
type SaveAsMarkdownInput struct { Results []SavedResults CurrentDate time.Time InstanceType string FilePath string }
Click to show internal directories.
Click to hide internal directories.