csv_helper

package
v0.8.2-0...-610ca0c Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CSVFiles

func CSVFiles(directory string, disclude []string) []string

CSVFiles returns all csv files in a directory (and doesn't include csv files with strings in `disclude` in its name)

func CSVFilesFromEmbededFS

func CSVFilesFromEmbededFS(embededFS embed.FS, directory string) []string

CSVFilesFromEmbededFS returns all csv files in a directory from an embeded FS

func CSVOutputFileName

func CSVOutputFileName(directory, inputFile string) string

CSVOutputFileName returns name of csv file suffixed with the current unix timestamp and with the directory `directory` prefixed to its path Example: inputFile: "./data/something.csv" output: "./data/`directory`/something_`current unix timestamp`.csv"

func CreateFile

func CreateFile(file string) (*os.File, error)

CreateFile creates the file `file` and all the directories sepcified in `file`'s path if they don't exist

func KeepColumns

func KeepColumns(inputFile, outputFile string, cols []int) error

keepColumns saves the csv file `inputFile` as `outputFile` with only the specified columns

Types

This section is empty.

Jump to

Keyboard shortcuts

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