Documentation
¶
Index ¶
- Constants
- func CreateFile(filename string, s string) error
- func EscapeString(s string) string
- func GetLocation() *time.Location
- func GetRand() *rand.Rand
- func GetReader(r io.Reader, enc Encoding) io.Reader
- func HumarizeNumber(s string) string
- func IsReadableFromPipeOrRedirection() bool
- func Now() time.Time
- func SetCPU(i int)
- func SetColor(b bool)
- func SetDatetimeFormat(s string)
- func SetDelimiter(s string) error
- func SetEncoding(s string) error
- func SetFormat(s string) error
- func SetJsonQuery(s string)
- func SetLineBreak(s string) error
- func SetLocation(s string) error
- func SetNoHeader(b bool)
- func SetOut(s string) error
- func SetPrettyPrint(b bool)
- func SetQuiet(b bool)
- func SetRepository(s string) error
- func SetSource(s string) error
- func SetStats(b bool)
- func SetWaitTimeout(f float64)
- func SetWithoutHeader(b bool)
- func SetWithoutNull(b bool)
- func SetWriteDelimiter(s string) error
- func SetWriteEncoding(s string) error
- func ToStdout(s string) error
- func TryCreateFile(filename string) error
- func UnescapeString(s string) string
- func UpdateFile(fp *os.File, s string) error
- type Encoding
- type Flags
- type Format
- type LineBreak
- type ReadLineTerminal
- type VirtualTerminal
Constants ¶
View Source
const ( CsvExt = ".csv" TsvExt = ".tsv" JsonExt = ".json" GfmExt = ".md" OrgExt = ".org" )
View Source
const ( TerminalPrompt string = "csvq > " TerminalContinuousPrompt string = " > " )
View Source
const HistoryFile = ".csvq_history"
View Source
const UNDEF = -1
Variables ¶
This section is empty.
Functions ¶
func CreateFile ¶ added in v0.1.6
func EscapeString ¶ added in v0.8.0
func GetLocation ¶
func HumarizeNumber ¶ added in v0.6.1
func IsReadableFromPipeOrRedirection ¶ added in v0.8.0
func IsReadableFromPipeOrRedirection() bool
func SetDatetimeFormat ¶ added in v0.2.7
func SetDatetimeFormat(s string)
func SetDelimiter ¶
func SetEncoding ¶
func SetJsonQuery ¶ added in v1.3.0
func SetJsonQuery(s string)
func SetLineBreak ¶
func SetLocation ¶ added in v0.3.2
func SetNoHeader ¶
func SetNoHeader(b bool)
func SetPrettyPrint ¶ added in v1.3.0
func SetPrettyPrint(b bool)
func SetRepository ¶
func SetWaitTimeout ¶ added in v0.7.10
func SetWaitTimeout(f float64)
func SetWithoutHeader ¶
func SetWithoutHeader(b bool)
func SetWithoutNull ¶
func SetWithoutNull(b bool)
func SetWriteDelimiter ¶
func SetWriteEncoding ¶
func TryCreateFile ¶ added in v0.7.4
func UnescapeString ¶ added in v0.1.5
Types ¶
type Flags ¶
type Flags struct { // Global Options Delimiter rune JsonQuery string Encoding Encoding LineBreak LineBreak Location string Repository string Source string DatetimeFormat string WaitTimeout float64 NoHeader bool WithoutNull bool // For Output WriteEncoding Encoding OutFile string Format Format PrettyPrint bool Color bool WriteDelimiter rune WithoutHeader bool // System Use Quiet bool CPU int Stats bool // Fixed Value RetryInterval time.Duration // Use in tests Now string }
type ReadLineTerminal ¶ added in v0.8.1
type ReadLineTerminal struct {
// contains filtered or unexported fields
}
func (ReadLineTerminal) ReadLine ¶ added in v0.8.1
func (t ReadLineTerminal) ReadLine() (string, error)
func (ReadLineTerminal) SaveHistory ¶ added in v0.8.1
func (t ReadLineTerminal) SaveHistory(s string)
func (ReadLineTerminal) SetContinuousPrompt ¶ added in v0.8.1
func (t ReadLineTerminal) SetContinuousPrompt()
func (ReadLineTerminal) SetPrompt ¶ added in v0.8.1
func (t ReadLineTerminal) SetPrompt()
func (ReadLineTerminal) Teardown ¶ added in v0.8.1
func (t ReadLineTerminal) Teardown()
func (ReadLineTerminal) Write ¶ added in v0.8.1
func (t ReadLineTerminal) Write(s string) error
type VirtualTerminal ¶ added in v0.8.1
type VirtualTerminal interface { ReadLine() (string, error) Write(string) error SetPrompt() SetContinuousPrompt() SaveHistory(string) Teardown() }
var Terminal VirtualTerminal
func NewTerminal ¶ added in v0.8.0
func NewTerminal() (VirtualTerminal, error)
Click to show internal directories.
Click to hide internal directories.