Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Read ¶
Read reads a CSV file from the given file path and returns a slice of strings containing the data from the first column of the file.
The separator parameter specifies the delimiter used in the CSV file. The function returns an error if the file cannot be opened or read. It closes the file after reading it.
func Write ¶
func Write(fileName string, folderName string, decisions []models.WriteStruct) error
Write function takes in a fileName string, a folderName string, and a slice of models.WriteStruct named decisions.
It creates a CSV file in the specified folder with the given file name and writes the data from decisions into the file. This function uses two helper functions, createFile and generateRow.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.