cli

package
v0.0.0-...-914d145 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2017 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Empty = cmd.CMD{
	Name:  "empty",
	Alias: "E",
	Short: "Check for empty cells in a CSV file",
	Args:  &EmptyArgs{},
	Run:   EmptyRun,
}

Empty checks for empty cells in a CSV file

View Source
var Root *cmd.RootCMD

Root is the main command for this application

View Source
var Types = cmd.CMD{
	Name:  "types",
	Alias: "T",
	Short: "Try to determine the possible data types",
	Args:  &TypesArgs{},
	Run:   TypesRun,
}

Types reads the CSV file and determines the possible types

View Source
var Unique = cmd.CMD{
	Name:  "unique",
	Alias: "U",
	Short: "Check for unique values in a CSV file",
	Args:  &UniqueArgs{},
	Run:   UniqueRun,
}

Unique checks for unique values in a CSV file

Functions

func EmptyRun

func EmptyRun(r *cmd.RootCMD, c *cmd.CMD)

EmptyRun carries out the search for empty CSV cells

func OpenCSV

func OpenCSV(filename string, delimiter string) (file *os.File, decompressor io.ReadCloser, reader *csv.Reader)

OpenCSV opens a CSV file with buffered IO, handling bzip2 and gzip compression formats

func TypesRun

func TypesRun(r *cmd.RootCMD, c *cmd.CMD)

TypesRun carries out the type testing process

func UniqueRun

func UniqueRun(r *cmd.RootCMD, c *cmd.CMD)

UniqueRun carries out the search unique CSV values

Types

type EmptyArgs

type EmptyArgs struct {
	CSV string `desc:"Path to a CSV file to analyze"`
}

EmptyArgs contains the arguments for the "empty" subcommand

type GlobalFlags

type GlobalFlags struct {
	Delimiter  string `short:"d" long:"delimiter"   desc:"A delimiter to use instead of a comma"`
	RowData    bool   `short:"r" long:"row-data"    desc:"Data is in rows, not columns"`
	SkipLabels bool   `short:"s" long:"skip-labels" desc:"Skip the first row or column as labels"`
}

GlobalFlags

type TypesArgs

type TypesArgs struct {
	CSV string `desc:"Path to a CSV file to analyze"`
}

TypesArgs contains the arguments for the "empty" subcommand

type UniqueArgs

type UniqueArgs struct {
	CSV string `desc:"Path to a CSV file to analyze"`
}

UniqueArgs contains the arguments for the "unique" subcommand

Jump to

Keyboard shortcuts

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