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
SaveAsMarkdown is the main entry point.
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
}
type SavedResults ¶
type SavedResults struct {
Procedure string `json:"procedure"`
BranchingFactor int `json:"branching_factor"`
QtyStreams int `json:"qty_streams"`
DataPoints int `json:"data_points"`
DurationMs int64 `json:"duration_ms"`
Visibility string `json:"visibility"`
Samples int `json:"samples"`
UnixOnly bool `json:"unix_only"`
}