apiroutetesthelper

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArrayOfMapsToCSV

func ArrayOfMapsToCSV(arr []map[string]any, targetCSVFile string) error

ArrayOfMapsToCSV converts an array of maps into a CSV file

func PrepareMock

func PrepareMock(mockGTFSYMLFilepath string) (string, error)

Take the YML input mock GTFS spec and generate a mock mobility database CSV which imports a generate GTFS zip from that YML

func YMLToCSVZip

func YMLToCSVZip(yamlFilepath string) (string, error)

YMLToCSVZip takes a YML filepath as input with YML sepcification for a ZIP of CSVs looking like:

foo.csv:

  • { bar: baz, bil: bin }
  • { bar: baz, bil: bin }

bar.csv:

  • { bar: baz, bil: bin }
  • { bar: baz, bil: bin }

And writes out a ZIP archive with the corresponding files of CSVs. For example in the above sample, 2 CSV files would be in the ZIP (foo.csv, and bar.csv) each with 2 rows.

Types

This section is empty.

Jump to

Keyboard shortcuts

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