Documentation ¶
Index ¶
- Constants
- Variables
- func AbsPath(fname string) (string, error)
- func AbsºInt(x int64) int64
- func AddºBufBuf(left *core.Buffer, right *core.Buffer) (out *core.Buffer)
- func AddºCharChar(left, right int64) string
- func AddºCharStr(left int64, right string) string
- func AddºFloatInt(left float64, right int64) float64
- func AddºIntFloat(left int64, right float64) float64
- func AddºStrChar(left string, right int64) string
- func AppendFileºStrBuf(filename string, buf *core.Buffer) error
- func AppendFileºStrStr(filename, s string) error
- func ArgCount(rt *Runtime) int64
- func Args(rt *Runtime) *core.Array
- func ArgsTail(rt *Runtime) *core.Array
- func ArgsºStr(rt *Runtime, flag string) *core.Array
- func ArgºStr(rt *Runtime, flag string) string
- func ArgºStrInt(rt *Runtime, flag string, def int64) (int64, error)
- func ArgºStrStr(rt *Runtime, flag, def string) string
- func AssignAddºArr(dest interface{}, src interface{}) (interface{}, error)
- func AssignAddºArrAny(arr interface{}, value interface{}) (interface{}, error)
- func AssignAddºBufBuf(buf interface{}, value interface{}) (interface{}, error)
- func AssignAddºBufChar(buf interface{}, value interface{}) (interface{}, error)
- func AssignAddºBufInt(buf interface{}, value interface{}) (interface{}, error)
- func AssignAddºBufStr(buf interface{}, value interface{}) (interface{}, error)
- func AssignAddºFloatFloat(ptr *float64, value float64) (float64, error)
- func AssignAddºIntInt(ptr *int64, value int64) (int64, error)
- func AssignAddºSetSet(set interface{}, value interface{}) (interface{}, error)
- func AssignAddºStrChar(ptr *string, value interface{}) (string, error)
- func AssignAddºStrStr(ptr *string, value interface{}) (string, error)
- func AssignBitAndºIntInt(ptr *int64, value int64) (int64, error)
- func AssignBitOrºIntInt(ptr *int64, value int64) (int64, error)
- func AssignBitXorºIntInt(ptr *int64, value int64) (int64, error)
- func AssignDivºFloatFloat(ptr *float64, value float64) (float64, error)
- func AssignDivºIntInt(ptr *int64, value int64) (int64, error)
- func AssignLShiftºIntInt(ptr *int64, value int64) (int64, error)
- func AssignModºIntInt(ptr *int64, value int64) (int64, error)
- func AssignMulºFloatFloat(ptr *float64, value float64) (float64, error)
- func AssignMulºIntInt(ptr *int64, value int64) (int64, error)
- func AssignRShiftºIntInt(ptr *int64, value int64) (int64, error)
- func AssignSubºFloatFloat(ptr *float64, value float64) (float64, error)
- func AssignSubºIntInt(ptr *int64, value int64) (int64, error)
- func AssignºStrBool(ptr *string, value interface{}) (string, error)
- func AssignºStrInt(ptr *string, value interface{}) (string, error)
- func Base64ºBuf(buf *core.Buffer) string
- func BaseName(fname string) string
- func BitAndºSetSet(left *core.Set, right *core.Set) *core.Set
- func BitNotºSet(set *core.Set) *core.Set
- func BitOrºSetSet(left *core.Set, right *core.Set) *core.Set
- func CeilºFloat(val float64) int64
- func ChDirºStr(dirname string) error
- func Command(cmdLine string) error
- func CommandOutput(cmdLine string) (string, error)
- func CopyFileºStrStr(src, dest string) (int64, error)
- func CopyVar(rt *Runtime, ptr *interface{}, value interface{})
- func CreateDirºStr(dirname string) error
- func CtxGetºStr(rt *Runtime, key string) (string, error)
- func CtxIsºStr(rt *Runtime, key string) int64
- func CtxSetºStrBool(rt *Runtime, key string, value int64) (string, error)
- func CtxSetºStrFloat(rt *Runtime, key string, value float64) (string, error)
- func CtxSetºStrInt(rt *Runtime, key string, value int64) (string, error)
- func CtxSetºStrStr(rt *Runtime, key, value string) (string, error)
- func CtxValueºStr(rt *Runtime, key string) string
- func CtxºStr(rt *Runtime, input string) (string, error)
- func DaysºTime(it *Struct) int64
- func DelºBufIntInt(buf *core.Buffer, off, length int64) (*core.Buffer, error)
- func DelºMapStr(pmap *core.Map, key string) *core.Map
- func Dir(fname string) string
- func DivºFloatInt(left float64, right int64) (float64, error)
- func DivºIntFloat(left int64, right float64) (float64, error)
- func Download(url, filename string) (int64, error)
- func EqualºFloatInt(left float64, right int64) int64
- func EqualºTimeTime(left, right *Struct) int64
- func ErrFormat(path string, line, pos int64, message string) string
- func ErrID(err *RuntimeError) int64
- func ErrText(err *RuntimeError) string
- func ErrTrace(rt *Runtime, err *RuntimeError) *core.Array
- func ErrorText(id int) string
- func ExpStrºBool(left string, right int64) string
- func ExpStrºChar(left string, right int64) string
- func ExpStrºFloat(left string, right float64) string
- func ExpStrºInt(left string, right int64) string
- func Ext(fname string) string
- func FindRegExpºStrStr(src, rePattern string) (*core.Array, error)
- func FindºStrStr(s, substr string) (off int64)
- func FloorºFloat(val float64) int64
- func FormatºStr(pattern string, pars ...interface{}) string
- func FormatºTimeStr(layout string, t *Struct) string
- func GetCurDir() (string, error)
- func GetEnv(name string) string
- func GreaterºCharChar(left, right int64) int64
- func GreaterºFloatInt(left float64, right int64) int64
- func GreaterºTimeTime(left, right *Struct) int64
- func HTTPGet(url string) (buf *core.Buffer, err error)
- func HTTPPage(url string) (string, error)
- func HasPrefixºStrStr(s, prefix string) int64
- func HasSuffixºStrStr(s, suffix string) int64
- func HexºBuf(buf *core.Buffer) string
- func IncDecºInt(ptr *int64, shift int64) (int64, error)
- func InsertºBufIntBuf(buf *core.Buffer, off int64, b *core.Buffer) (*core.Buffer, error)
- func IsArgºStr(rt *Runtime, flag string) int64
- func IsKeyºMapStr(pmap *core.Map, key string) int64
- func IsSet(set *core.Set, index int64) int64
- func JoinPath(pars ...interface{}) string
- func JoinºArrStr(value *core.Array, sep string) string
- func KeyºMapInt(pmap *core.Map, index int64) (string, error)
- func LeftºStrInt(s string, count int64) string
- func LessºCharChar(left, right int64) int64
- func LessºFloatInt(left float64, right int64) int64
- func LessºTimeTime(left, right *Struct) int64
- func LinesºStr(in string) *core.Array
- func LowerºStr(s string) string
- func MatchPath(pattern, fname string) (int64, error)
- func MatchºStrStr(s string, rePattern string) (int64, error)
- func MaxºFloatFloat(left, right float64) float64
- func MaxºIntInt(left, right int64) int64
- func Md5FileºStr(filename string) (string, error)
- func Md5ºBuf(in *core.Buffer) (out *core.Buffer)
- func Md5ºStr(in string) (out *core.Buffer)
- func MinºFloatFloat(left, right float64) float64
- func MinºIntInt(left, right int64) int64
- func MulºFloatInt(left float64, right int64) float64
- func MulºIntFloat(left int64, right float64) float64
- func OpenWithºStr(app, fname string) error
- func OpenºStr(fname string) error
- func Print(pars ...interface{}) (int64, error)
- func PrintShiftºStr(par string) (int64, error)
- func Println(pars ...interface{}) (int64, error)
- func ReadDirºStr(rt *Runtime, dirname string) (*core.Array, error)
- func ReadFileºStr(filename string) (string, error)
- func ReadFileºStrBuf(filename string, buf *core.Buffer) (*core.Buffer, error)
- func ReadFileºStrIntInt(filename string, off int64, length int64) (buf *core.Buffer, err error)
- func ReadString(rt *Runtime, text string) (string, error)
- func RemoveDirºStr(dirname string) error
- func RemoveºStr(filename string) error
- func RenameºStrStr(oldname, newname string) error
- func RepeatºStrInt(input string, count int64) string
- func ReplaceRegExpºStrStr(src, rePattern, repl string) (string, error)
- func ReplaceºStrStrStr(in, old, new string) string
- func ReverseºArr(arr *core.Array) *core.Array
- func RoundºFloat(val float64) int64
- func RoundºFloatInt(val float64, digits int64) float64
- func Run(exec *core.Exec, settings Settings) (interface{}, error)
- func SetEnv(name string, value interface{}) (string, error)
- func SetEnvBool(name string, value int64) (string, error)
- func SetFileTimeºStrTime(name string, ftime *Struct) error
- func SetºSet(set *core.Set, index int64) (*core.Set, error)
- func Sha256FileºStr(filename string) (string, error)
- func Sha256ºBuf(in *core.Buffer) (out *core.Buffer)
- func Sha256ºStr(in string) (out *core.Buffer)
- func ShiftºStr(par string) string
- func SliceºArr(rt *Runtime, arr *core.Array, start, end int64) (*core.Array, error)
- func SortºArr(value *core.Array) *core.Array
- func SplitºStrStr(in, sep string) *core.Array
- func SubstrºStrIntInt(in string, off, length int64) (string, error)
- func SubºFloatInt(left float64, right int64) float64
- func SubºIntFloat(left int64, right float64) float64
- func TempDir() string
- func TempDirºStrStr(dir, prefix string) (string, error)
- func ToggleºSetInt(set *core.Set, index int64) (prev int64, err error)
- func Trace(rt *Runtime) *core.Array
- func TrimRightºStr(in string, set string) string
- func TrimSpaceºStr(in string) string
- func UnBase64ºStr(value string) (buf *core.Buffer, err error)
- func UnHexºStr(value string) (*core.Buffer, error)
- func UnSetºSet(set *core.Set, index int64) (*core.Set, error)
- func UpperºStr(s string) string
- func WeekdayºTime(rt *Runtime, t *Struct) int64
- func WriteFileºStrBuf(filename string, buf *core.Buffer) error
- func WriteFileºStrStr(filename, in string) error
- func YearDayºTime(t *Struct) int64
- type Call
- type Const
- type Fn
- type OptValue
- type Runtime
- type RuntimeError
- type Settings
- type Struct
- func AddHoursºTimeInt(rt *Runtime, it *Struct, hours int64) *Struct
- func DateTimeºInts(rt *Runtime, year, month, day, hour, minute, second int64) *Struct
- func DateºInts(rt *Runtime, year, month, day int64) *Struct
- func FileInfoºStr(rt *Runtime, name string) (*Struct, error)
- func NewStruct(rt *Runtime, sInfo *core.StructInfo) *Struct
- func Now(rt *Runtime) *Struct
- func ParseTimeºStrStr(rt *Runtime, layout, value string) (*Struct, error)
- func UTCºTime(rt *Runtime, local *Struct) *Struct
- type Thread
- type TraceInfo
- type VM
Constants ¶
const ( // CtxChar is a context boundery character CtxChar = '#' // CtxLength is the max length of the context key CtxLength = 64 // CtxDeep is the max deep in replace function CtxDeep = 16 )
const ( // ErrRunIndex is returned when Run has been executed with wrong index ErrRunIndex = iota + 1 // ErrDepth is returned when maximum depth of recursion has been reached ErrDepth // ErrDivZero is returned when there is division by zero ErrDivZero // ErrCycle is returned when maximum cycle count has been reached ErrCycle // ErrShift is returned when << or >> are used with the negative right operand ErrShift // ErrStrToInt is returned when the conversion string to integer is invalid ErrStrToInt // ErrStrToFloat is returned when the conversion string to float is invalid ErrStrToFloat // ErrEmptyCommand is returned if empty command is specified in $ ErrEmptyCommand // ErrQuoteCommand is returned if there is an unclosed quotation mark in $ command ErrQuoteCommand // ErrIndexOut means that int index is out of the length of the array ErrIndexOut // ErrMapIndex is returned when there is not the key in the map ErrMapIndex // ErrAssignment is returned when there is a recursive assignment ErrAssignment // ErrUndefined means that the value of the variable is undefined ErrUndefined // ErrByteOut is returned when value for buf is greater 255 ErrByteOut // ErrInvalidParam is returned when the function gets invalid parameter(s) ErrInvalidParam // ErrNotRun is returned when the executing unit doesn't have run function ErrNotRun // ErrFnEmpty is returned in case of calling undefined fn variable ErrFnEmpty // ErrThreadIndex is returned when the index of the thread is out of range ErrThreadIndex // ErrThreadClosed is generated when the thread has been closed ErrThreadClosed // ErrPlatform is generated when the function is not supported on the current platform ErrPlatform // ErrCustom is generated when there is an invalid custom declaration ErrCustom // ErrCRC is returned when Exec was compiled with different stdlib or custom functions ErrCRC // ErrEmbedded means golang error in embedded functions ErrEmbedded = 254 // ErrRuntime error. It means bug ErrRuntime = 255 )
const ( TRACESTRUCT = iota TIMESTRUCT FINFOSTRUCT )
const ( // ThQueue means that the thread is in the queue to start ThQueue = iota // ThWork means that the thread is running ThWork // ThPaused means that the thread has been suspended ThPaused // ThWait means that the thread is waiting for the end of another thread ThWait // ThFinished means that the thread finished ThFinished // ThError means that the thread has been closed with an error ThError // ThClosed means that the thread has been closed ThClosed )
const ( // ThCmdClose closes the thread ThCmdClose = iota // ThCmdResume resumes the thread ThCmdResume // ThCmdContinue continues the thread after waiting ThCmdContinue )
const ( STACKSIZE = 256 // CYCLE is the limit of loops CYCLE = uint64(16000000) // DEPTH is the maximum size of blocks stack DEPTH = uint32(1000) )
const ( // SleepStep is a tick in sleep SleepStep = int64(100) )
const StdLibCount = 260
Variables ¶
var ( // ErrCtxLength is returned when the key is too long ErrCtxLength = `key length is longer than %d characters` // ErrCtxLoop is returned when there is a loop in values of context ErrCtxLoop = `%s key refers to itself` // ErrCtxDeep is returned if the maximum depth reached ErrCtxDeep = `maximum depth reached` )
var CRCCustom uint64
var CRCStdlib uint64
var EmbedFuncs = []core.Embed{}/* 260 elements not displayed */
Functions ¶
func AddºBufBuf ¶ added in v1.7.0
AddºBufBuf adds two buffers
func AddºCharChar ¶ added in v1.7.0
AddºCharChar adds two rune values
func AddºCharStr ¶ added in v1.7.0
AddºCharStr appends rune to string
func AddºFloatInt ¶ added in v1.7.0
AddºFloatInt adds float and int
func AddºIntFloat ¶ added in v1.7.0
AddºIntFloat adds int and float
func AddºStrChar ¶ added in v1.7.0
AddºStrChar appends rune to string
func AppendFileºStrBuf ¶ added in v1.7.0
AppendFileºStrBuf appends a buffer to a file
func AppendFileºStrStr ¶ added in v1.7.0
AppendFileºStrStr appends a string to a file
func ArgºStrInt ¶ added in v1.6.0
ArgºStrInt returns the number value of the command-line option or the default value
func ArgºStrStr ¶ added in v1.6.0
ArgºStrStr returns the value of the command-line option or the default value
func AssignAddºArr ¶ added in v1.7.0
func AssignAddºArr(dest interface{}, src interface{}) (interface{}, error)
AssignAddºArr appends one array to another one
func AssignAddºArrAny ¶ added in v1.7.0
func AssignAddºArrAny(arr interface{}, value interface{}) (interface{}, error)
AssignAddºArrAny appends an item to array
func AssignAddºBufBuf ¶ added in v1.7.0
func AssignAddºBufBuf(buf interface{}, value interface{}) (interface{}, error)
AssignAddºBufBuf appends buffer to buffer
func AssignAddºBufChar ¶ added in v1.7.0
func AssignAddºBufChar(buf interface{}, value interface{}) (interface{}, error)
AssignAddºBufChar appends rune to buffer
func AssignAddºBufInt ¶ added in v1.7.0
func AssignAddºBufInt(buf interface{}, value interface{}) (interface{}, error)
AssignAddºBufInt appends one byte to buffer
func AssignAddºBufStr ¶ added in v1.7.0
func AssignAddºBufStr(buf interface{}, value interface{}) (interface{}, error)
AssignAddºBufStr appends string to buffer
func AssignAddºFloatFloat ¶ added in v1.7.0
AssignAddºFloatFloat adds one float to another
func AssignAddºIntInt ¶ added in v1.7.0
AssignAddºIntInt adds one integer to another
func AssignAddºSetSet ¶ added in v1.7.0
func AssignAddºSetSet(set interface{}, value interface{}) (interface{}, error)
AssignAddºSetSet appends set to set
func AssignAddºStrChar ¶ added in v1.7.0
AssignAddºStrChar appends one rune to string
func AssignAddºStrStr ¶ added in v1.7.0
AssignAddºStrStr appends one string to another
func AssignBitAndºIntInt ¶ added in v1.7.0
AssignBitAndºIntInt equals int &= int
func AssignBitOrºIntInt ¶ added in v1.7.0
AssignBitOrºIntInt equals int |= int
func AssignBitXorºIntInt ¶ added in v1.7.0
AssignBitXorºIntInt equals int ^= int
func AssignDivºFloatFloat ¶ added in v1.7.0
AssignDivºFloatFloat does float /= float
func AssignDivºIntInt ¶ added in v1.7.0
AssignDivºIntInt does int /= int
func AssignLShiftºIntInt ¶ added in v1.7.0
AssignLShiftºIntInt does int <<= int
func AssignModºIntInt ¶ added in v1.7.0
AssignModºIntInt equals int %= int
func AssignMulºFloatFloat ¶ added in v1.7.0
AssignMulºFloatFloat equals float *= float
func AssignMulºIntInt ¶ added in v1.7.0
AssignMulºIntInt equals int *= int
func AssignRShiftºIntInt ¶ added in v1.7.0
AssignRShiftºIntInt does int >>= int
func AssignSubºFloatFloat ¶ added in v1.7.0
AssignSubºFloatFloat equals float *= float
func AssignSubºIntInt ¶ added in v1.7.0
AssignSubºIntInt equals int *= int
func AssignºStrBool ¶ added in v1.7.0
AssignºStrBool assigns boolean to string
func AssignºStrInt ¶ added in v1.7.0
AssignºStrInt assigns integer to string
func Base64ºBuf ¶ added in v1.7.0
Base64ºBuf encodes buf to base64 string
func BitAndºSetSet ¶ added in v1.7.0
BitAndºSetSet equals set & set
func BitNotºSet ¶ added in v1.7.0
BitNotºSet changes boolean value of set
func BitOrºSetSet ¶ added in v1.7.0
BitOrºSetSet equals set & set
func CeilºFloat ¶ added in v1.7.0
CeilºFloat returns the least integer value greater than or equal to val.
func CommandOutput ¶ added in v1.7.0
CommandOutput executes the command line and returns the standard output
func CopyFileºStrStr ¶ added in v1.7.0
CopyFileºStrStr copies a file
func CopyVar ¶ added in v1.6.0
func CopyVar(rt *Runtime, ptr *interface{}, value interface{})
CopyVar copies one object to another one
func CreateDirºStr ¶ added in v1.7.0
CreateDirºStr creates the directory(s)
func CtxGetºStr ¶ added in v1.6.0
CtxGetºStr replaces context values in the value of the key
func CtxSetºStrBool ¶ added in v1.6.0
CtxSetºStrBool assign a bool to a context key
func CtxSetºStrFloat ¶ added in v1.6.0
CtxSetºStrFloat assign a float to a context key
func CtxSetºStrInt ¶ added in v1.6.0
CtxSetºStrInt assign an integer to a context key
func CtxSetºStrStr ¶ added in v1.6.0
CtxSetºStrStr sets a context value
func CtxValueºStr ¶ added in v1.6.0
CtxValueºStr returns a context value
func DelºBufIntInt ¶ added in v1.7.0
DelºBufIntInt deletes part of the buffer
func DelºMapStr ¶ added in v1.7.0
DelºMapStr deletes key and value from the map
func DivºFloatInt ¶ added in v1.7.0
DivºFloatInt divides one float by int
func DivºIntFloat ¶ added in v1.7.0
DivºIntFloat divides one int by float
func EqualºFloatInt ¶ added in v1.7.0
EqualºFloatInt returns true if left == right
func EqualºTimeTime ¶ added in v1.6.0
EqualºTimeTime returns true if time structures are equal
func ErrText ¶ added in v1.6.0
func ErrText(err *RuntimeError) string
ErrText returns the text of the error
func ErrTrace ¶ added in v1.6.0
func ErrTrace(rt *Runtime, err *RuntimeError) *core.Array
ErrTrace returns the trace of the error
func ExpStrºBool ¶ added in v1.7.0
ExpStrºBool adds string and boolean in string expression
func ExpStrºChar ¶ added in v1.7.0
ExpStrºChar adds string and char in string expression
func ExpStrºFloat ¶ added in v1.7.0
ExpStrºFloat adds string and float in string expression
func ExpStrºInt ¶ added in v1.7.0
ExpStrºInt adds string and integer in string expression
func FindRegExpºStrStr ¶ added in v1.7.0
FindRegExpºStrStr returns an array of all successive matches of the expression
func FindºStrStr ¶ added in v1.7.0
FindºStrStr returns the index of the first instance of substr
func FloorºFloat ¶ added in v1.7.0
FloorºFloat returns the greatest integer value less than or equal to val.
func FormatºStr ¶ added in v1.7.0
FormatºStr formats according to a format specifier and returns the resulting string
func FormatºTimeStr ¶ added in v1.6.0
FormatºTimeStr formats the time
func GreaterºCharChar ¶ added in v1.7.0
GreaterºCharChar returns true if left > right
func GreaterºFloatInt ¶ added in v1.7.0
GreaterºFloatInt returns true if left > right
func GreaterºTimeTime ¶ added in v1.6.0
GreaterºTimeTime returns true if left time structures are greater than right
func HTTPPage ¶ added in v1.7.0
HTTPPage issues a GET to the specified URL and returns a string result.
func HasPrefixºStrStr ¶ added in v1.7.0
HasPrefixºStrStr returns true if the string s begins with prefix
func HasSuffixºStrStr ¶ added in v1.7.0
HasSuffixºStrStr returns true if the string s ends with suffix
func IncDecºInt ¶ added in v1.7.0
IncDecºInt incriment and decriment
func InsertºBufIntBuf ¶ added in v1.7.0
InsertºBufIntBuf inserts one buf object into another one
func IsKeyºMapStr ¶ added in v1.7.0
IsKeyºMapStr returns true if there is the key in the map
func JoinPath ¶ added in v1.7.0
func JoinPath(pars ...interface{}) string
JoinPath joins any number of path elements into a single path.
func JoinºArrStr ¶ added in v1.7.0
JoinºArrStr concatenates the elements of a to create a single string.
func KeyºMapInt ¶ added in v1.7.0
KeyºMapInt returns the key by the index
func LeftºStrInt ¶ added in v1.7.0
LeftºStrInt cuts the string.
func LessºCharChar ¶ added in v1.7.0
LessºCharChar returns true if left < right
func LessºFloatInt ¶ added in v1.7.0
LessºFloatInt returns true if left < right
func LessºTimeTime ¶ added in v1.6.0
LessºTimeTime returns true if left time structures are less than right
func LowerºStr ¶ added in v1.7.0
LowerºStr converts a copy of the string to their lower case and returns it.
func MatchPath ¶ added in v1.7.0
MatchPath reports whether name matches the specified file name pattern.
func MatchºStrStr ¶ added in v1.7.0
MatchºStrStr reports whether the string s contains any match of the regular expression
func MaxºFloatFloat ¶ added in v1.7.0
MaxºFloatFloat returns the maximum of two float numbers
func MaxºIntInt ¶ added in v1.7.0
MaxºIntInt returns the maximum of two integers
func Md5FileºStr ¶ added in v1.7.0
Md5FileºStr returns md5 hash of the file as a hex string
func MinºFloatFloat ¶ added in v1.7.0
MinºFloatFloat returns the minimum of two float numbers
func MinºIntInt ¶ added in v1.7.0
MinºIntInt returns the minimum of two integers
func MulºFloatInt ¶ added in v1.7.0
MulºFloatInt multiplies float and int
func MulºIntFloat ¶ added in v1.7.0
MulºIntFloat multiplies int and float
func OpenWithºStr ¶ added in v1.6.0
OpenWithºStr runs the application with the specified file.
func PrintShiftºStr ¶ added in v1.7.0
PrintShiftºStr writes to standard output with trim spaces characters in the each line.
func ReadDirºStr ¶ added in v1.6.0
ReadDirºStr reads a directory
func ReadFileºStr ¶ added in v1.7.0
ReadFileºStr reads a file
func ReadFileºStrBuf ¶ added in v1.7.0
ReadFileºStrBuf reads a file to buffer
func ReadFileºStrIntInt ¶ added in v1.7.0
ReadFileºStrIntInt reads a part of the file to the buffer
func ReadString ¶ added in v1.7.0
ReadString reads a string from standard input.
func RemoveDirºStr ¶ added in v1.7.0
RemoveDirºStr removes a directory
func RemoveºStr ¶ added in v1.7.0
RemoveºStr removes a file or an empty directory
func RenameºStrStr ¶ added in v1.7.0
RenameºStrStr renames a file or a directory
func RepeatºStrInt ¶ added in v1.7.0
RepeatºStrInt returns a new string consisting of count copies of the specified string.
func ReplaceRegExpºStrStr ¶ added in v1.7.0
ReplaceRegExpºStrStr returns a copy of src, replacing matches of the Regexp with the replacement string
func ReplaceºStrStrStr ¶ added in v1.7.0
ReplaceºStrStrStr replaces strings in a string
func ReverseºArr ¶ added in v1.7.0
ReverseºArr reverses an array
func RoundºFloat ¶ added in v1.7.0
RoundºFloat returns the nearest integer, rounding half away from zero.
func RoundºFloatInt ¶ added in v1.7.0
RoundºFloatInt returns a number with the specified number of decimal places.
func SetEnvBool ¶ added in v1.7.0
SetEnvBool assign the value to the environment variable
func SetFileTimeºStrTime ¶ added in v1.6.0
SetFileTimeºStrTime changes the modification time of the named file
func Sha256FileºStr ¶ added in v1.7.0
Sha256FileºStr returns sha256 hash of the file as a hex string
func Sha256ºBuf ¶ added in v1.7.0
Sha256ºBuf returns md5 hash of the buffer
func Sha256ºStr ¶ added in v1.7.0
Sha256ºStr returns md5 hash of the string as hex string
func ShiftºStr ¶ added in v1.7.0
ShiftºStr trims white spaces characters in the each line of the string.
func SplitºStrStr ¶ added in v1.7.0
SplitºStrStr splits a string to a array of strings
func SubstrºStrIntInt ¶ added in v1.7.0
SubstrºStrIntInt returns a substring with the specified offset and length
func SubºFloatInt ¶ added in v1.7.0
SubºFloatInt subtracts float and int
func SubºIntFloat ¶ added in v1.7.0
SubºIntFloat subtracts int and float
func TempDirºStrStr ¶ added in v1.7.0
TempDirºStrStr creates a directory in the temporary directory
func ToggleºSetInt ¶ added in v1.7.0
ToggleºSetInt changes the value of the set
func TrimRightºStr ¶ added in v1.7.0
TrimRightºStr trims white space in a string
func TrimSpaceºStr ¶ added in v1.7.0
TrimSpaceºStr trims white space in a string
func UnBase64ºStr ¶ added in v1.7.0
UnBase64ºStr decodes base64 string to buf
func UpperºStr ¶ added in v1.7.0
UpperºStr converts a copy of the string to their upper case and returns it.
func WeekdayºTime ¶ added in v1.6.0
WeekdayºTime returns the day of the week specified by t.
func WriteFileºStrBuf ¶ added in v1.7.0
WriteFileºStrBuf writes a buffer to a file
func WriteFileºStrStr ¶ added in v1.7.0
WriteFileºStrStr writes a string to a file
func YearDayºTime ¶ added in v1.6.0
YearDayºTime returns the day of the year specified by t.
Types ¶
type Call ¶
type Call struct { IsFunc bool IsLocal bool Cycle uint64 Offset int32 Int int32 Float int32 Str int32 Any int32 Optional *[]OptValue // for loop blocks Flags int16 Start int32 Continue int32 // shift for continue Break int32 // shift for break Try int32 // shift for try Recover int32 // shift for recover Retry int32 // shift for retry }
Call stores stack of blocks
type Fn ¶ added in v1.6.0
type Fn struct {
Func int32 // id of function
}
Fn is used for custom func types
type Runtime ¶
type Runtime struct { Owner *VM ParCount int32 Calls []Call Thread Thread ThreadID int64 Optional *[]OptValue // These are stacks for different types SInt [STACKSIZE]int64 // int, char, bool SFloat [STACKSIZE]float64 // float SStr [STACKSIZE]string // str SAny [STACKSIZE]interface{} // all other types }
Runtime is the one thread structure
type RuntimeError ¶ added in v1.6.0
RuntimeError is a runtime error type
func (*RuntimeError) Error ¶ added in v1.6.0
func (re *RuntimeError) Error() string
type Struct ¶ added in v1.6.0
type Struct struct { Type *core.StructInfo Values []interface{} // Values of fields }
Struct is used for custom struct types
func AddHoursºTimeInt ¶ added in v1.6.0
AddHoursºTimeInt adds/subtract hours
func DateTimeºInts ¶ added in v1.6.0
DateTimeºInts returns time
func FileInfoºStr ¶ added in v1.6.0
FileInfoºStr returns the finfo describing the named file.
func NewStruct ¶ added in v1.6.0
func NewStruct(rt *Runtime, sInfo *core.StructInfo) *Struct
NewStruct creates a new struct object
func ParseTimeºStrStr ¶ added in v1.6.0
ParseTimeºStrStr parses a formatted string and returns the time value it represents
type TraceInfo ¶ added in v1.6.0
type TraceInfo struct { Path string // the full path name of the source Entry string // the entry function name Func string // the called function Line int64 // line position in the source Pos int64 // column position in the line }
TraceInfo is a structure for stack func info
type VM ¶
type VM struct { Settings Settings Exec *core.Exec Consts map[int32]Const Runtimes []*Runtime CtxMutex sync.RWMutex ThreadMutex sync.RWMutex Context map[string]string Count int64 // count of active threads ChCount chan int64 ChError chan error }
VM is the main structure of the virtual machine