cmd

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2021 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package cmd is built to run the cobra CLI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanRunner added in v0.1.5

func CleanRunner() error

CleanRunner executes on the 'clean' command, it removes all the files specified.

func ConvertFileData added in v0.1.5

func ConvertFileData(newFileType string) error

ConvertFileData converts the ".jsonl" output to either ".json" or ".csv" output.

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func ExtractRunner added in v0.1.5

func ExtractRunner(cmd *cobra.Command, fName string, strictStatus bool)

ExtractRunner executes on the `extract` command. This function reads the specified csv file, and checks the target-column for Drug instances using ScanDrugs.

func ExtractServerRunner added in v0.2.0

func ExtractServerRunner(fName string, idCol string, targetCol string, strictStatus bool) error

ExtractServerRunner runs the extract command in server mode.

func FindColIndex added in v0.1.5

func FindColIndex(headers []string, colName string) (int, error)

FindColIndex finds the index of the targeted column amongst the headers. Returns the integer index of the column.

func ReadCsvFile added in v0.1.5

func ReadCsvFile(filePath string) ([]string, [][]string)

ReadCsvFile reads the user-provided csv input file. Returns the headers of the file and the data contained in the file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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