cmd

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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.

Types

type Config

type Config struct {
	PrimaryKeyPositions  []int
	ValueColumnPositions []int
	Base                 string
	Delta                string
	Additions            string
	Modifications        string
}

Config is to store all command line Flags.

func (*Config) AdditionsWriter

func (c *Config) AdditionsWriter() io.WriteCloser

AdditionsWriter gives the output stream for the additions in delta csv.

func (*Config) GetBaseReader

func (c *Config) GetBaseReader() io.Reader

GetBaseReader returns an io.Reader for the base file.

func (*Config) GetDeltaReader

func (c *Config) GetDeltaReader() io.Reader

GetDeltaReader returns an io.Reader for the delta file.

func (*Config) GetPrimaryKeys

func (c *Config) GetPrimaryKeys() digest.Positions

GetPrimaryKeys is to return the --primary-key flags as digest.Positions array.

func (*Config) GetValueColumns

func (c *Config) GetValueColumns() digest.Positions

GetValueColumns is to return the --value-columns flags as digest.Positions array.

func (*Config) ModificationsWriter

func (c *Config) ModificationsWriter() io.WriteCloser

ModificationsWriter gives the output stream for the modifications in delta csv.

Jump to

Keyboard shortcuts

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