csv_utils

package
v1.216.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGenerationInfoForReport

func GetGenerationInfoForReport(username string) []string

GetGenerationInfoForReport takes the csv event and returns the username and time of the request to generate the report.

func KeepLeadingZeroesInCsvField

func KeepLeadingZeroesInCsvField(fieldString string) string

KeepLeadingZeroesInCsvField prepends a tab character to a string if it is numeric, so that leading zeroes will not be removed by the CSV

func SQLToCSVData

func SQLToCSVData(rows *sql.Rows) ([]byte, error)

func ToCSVBytes

func ToCSVBytes(generatedInfo []string, headers []string, data [][]string) ([]byte, error)

ToCsvBytes takes a list of header lines and data and returns the data in CSV format, as a byte slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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