stdlib

package
v0.0.0-...-1e04c87 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2018 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Null can be a single instance
	Null = &object.Null{}
)

Functions

func GetFn

func GetFn(name string) (*object.Builtin, bool)

GetFn returns function if defined

func Interpolate

func Interpolate(envV map[string]interface{}, value string) (string, error)

Interpolate replaces strings using a template

func RegisterBuiltin

func RegisterBuiltin(name string, def *object.Builtin)

RegisterBuiltin registers a 'builtin'

func RegisterFn

func RegisterFn(name string, def object.BuiltinFunction)

RegisterFn registers a 'builtin function'

func TestGzipItem

func TestGzipItem(item io.Reader) error

TODO: proper file checking (how to check validity?)

func TestGzipItems

func TestGzipItems(items []string) error

Types

type Grep

type Grep struct {
	IsPerl            bool
	IsExtended        bool // TODO extended is true by default
	IsIgnoreCase      bool
	IsInvertMatch     bool
	IsPrintFilename   bool // TODO filename is true by default
	IsPrintLineNumber bool
	IsRecurse         bool
	IsQuiet           bool // TODO
	LinesBefore       int  // TODO
	LinesAfter        int  // TODO
	LinesAround       int  // TODO
	// contains filtered or unexported fields
}

Grep represents and performs a `grep` invocation

type Gunzip

type Gunzip struct {
	IsTest    bool
	IsKeep    bool
	IsPipeOut bool
	Filenames []string
}

Gunzip represents and performs `gunzip` invocations

type Gzip

type Gzip struct {
	IsKeep    bool
	IsStdout  bool
	Filenames []string
	// contains filtered or unexported fields
}

Gzip represents and performs `gz` invocations

type Head struct {
	Filenames []string
	// contains filtered or unexported fields
}

Head represents and performs a `head` invocation

type Ls

type Ls struct {
	LongList   bool
	Recursive  bool
	Human      bool
	AllFiles   bool
	OnePerLine bool

	Stdin bool

	Filenames []string
	// contains filtered or unexported fields
}

Ls represents and performs a `ls` invocation

func (*Ls) Go

func (ls *Ls) Go(streams object.Streams) error

Go actually runs the ls ...

type Sleep

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

Sleep represents and performs a `sleep` invocation

func (*Sleep) Invoke

func (sleep *Sleep) Invoke() error

Invoke actually performs the sleep

type Tail

type Tail struct {
	Lines              int64
	FollowByDescriptor bool //TODO
	FollowByName       bool
	SleepInterval      float64
	Filenames          []string
}

Tail represents and performs a `tail` invocation

type Tee

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

Tee represents and performs a `tee` invocation

type Unzip

type Unzip struct {
	Filenames []string
	ZipFile   string
	// contains filtered or unexported fields
}

Unzip represents and performs `unzip` invocations

type Wc

type Wc struct {
	IsBytes bool
	IsWords bool
	IsLines bool
	// contains filtered or unexported fields
}

Wc represents and performs a `wc` invocation

type Which

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

Which represents and performs a `which` invocation

Jump to

Keyboard shortcuts

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