cli

package
v0.1.2-0...-b48ce14 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2017 License: EPL-1.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultFieldTemplate = "struct_sql_tomap.fm"
)

Variables

View Source
var DataFileFlag = []cmd.Flag{
	cmd.StringFlag{
		Name:  "data-file",
		Usage: "Provide data from a file. Value should be name:file.ext",
	},
}

Functions

func DebugFlag

func DebugFlag() []cmd.Flag

func Flags

func Flags(flags ...[]cmd.Flag) []cmd.Flag

func NewCli

func NewCli(p Processors) *cmd.App

func WithContext

func WithContext(p Processor) func(*cmd.Context)

Types

type CliConf

type CliConf struct {
	// contains filtered or unexported fields
}

func NewCliConf

func NewCliConf(c *cmd.Context) *CliConf

func (*CliConf) DataFile

func (c *CliConf) DataFile() (DataFile, error)

func (*CliConf) DataFiles

func (c *CliConf) DataFiles() ([]DataFile, error)

func (*CliConf) Debug

func (p *CliConf) Debug() bool

func (*CliConf) HasDataFile

func (p *CliConf) HasDataFile() bool

func (*CliConf) HasDataFiles

func (p *CliConf) HasDataFiles() bool

func (*CliConf) HasDebug

func (p *CliConf) HasDebug() bool

func (*CliConf) HasInputFile

func (p *CliConf) HasInputFile() bool

func (*CliConf) HasNoop

func (p *CliConf) HasNoop() bool

func (*CliConf) HasOutputFile

func (p *CliConf) HasOutputFile() bool

func (*CliConf) HasTemplate

func (p *CliConf) HasTemplate() bool

func (*CliConf) InputFile

func (p *CliConf) InputFile() string

func (*CliConf) IsTabDelimited

func (c *CliConf) IsTabDelimited() bool

func (*CliConf) Line

func (c *CliConf) Line() int

func (*CliConf) Noop

func (p *CliConf) Noop() bool

func (*CliConf) OutputFile

func (p *CliConf) OutputFile() string

func (*CliConf) String

func (p *CliConf) String() string

func (*CliConf) Template

func (p *CliConf) Template() string

type DataFile

type DataFile struct {
	Key, File string
}

type Processor

type Processor func(c *CliConf)

type Processors

type Processors struct {
	DocTableProcessor Processor
	FrontMatter       Processor
	FieldProcessor    Processor
	PlainProcessor    Processor
}

Jump to

Keyboard shortcuts

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