lib

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: MIT Imports: 34 Imported by: 0

Documentation

Overview

Copyright 2009 The Go Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

View Source
var ErrAborted = errors.New("aborted")
View Source
var ErrProcessAlreadyStarted = errors.New("process already started")
View Source
var Stdin = &stdinWrapper{
	File: os.Stdin,
}

Functions

func Len added in v0.3.0

func Len(m *vm.VM, args []vm.Value, nRet int) ([]vm.Value, error)

func NewExportRegistry added in v0.3.0

func NewExportRegistry() vm.ExportRegistry

func ParseJSON

func ParseJSON(r io.Reader) (nitro.Value, error)

func PopStdout

func PopStdout(m *nitro.VM) io.Writer

func PushStdout

func PushStdout(m *nitro.VM, out io.Writer)

func SetStderr

func SetStderr(m *nitro.VM, w io.Writer)

func SetStdout

func SetStdout(m *nitro.VM, w io.Writer)

func Stderr

func Stderr(m *nitro.VM) io.Writer

func Stdout

func Stdout(m *nitro.VM) io.Writer

func ToArray

func ToArray(m *nitro.VM, v nitro.Value) (*nitro.Array, error)

func ToJSON

func ToJSON(v nitro.Value, prefix, indent string) ([]byte, error)

Types

type Buffer

type Buffer struct {
	core.WriterBase
	// contains filtered or unexported fields
}

func NewBuffer

func NewBuffer(data string) *Buffer

func (*Buffer) Read

func (b *Buffer) Read(buf []byte) (int, error)

func (*Buffer) String

func (b *Buffer) String() string

type Duration

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

func NewDuration added in v0.3.0

func NewDuration(dur time.Duration) Duration

func (Duration) Duration

func (d Duration) Duration() time.Duration

func (Duration) EvalOp

func (d Duration) EvalOp(op nitro.Op, operand nitro.Value) (nitro.Value, error)

func (Duration) FallbackEvalOp added in v0.3.0

func (d Duration) FallbackEvalOp(op nitro.Op, left nitro.Value) (nitro.Value, error)

func (Duration) String

func (d Duration) String() string

func (Duration) Traits added in v0.3.0

func (d Duration) Traits() vm.Traits

func (Duration) Type

func (d Duration) Type() string

type File

type File struct {
	*os.File
}

func (*File) Call

func (f *File) Call(m *nitro.VM, args []nitro.Value, nRet int) ([]nitro.Value, error)

func (*File) GetNativeReader

func (f *File) GetNativeReader() io.Reader

func (*File) GetNativeWriter

func (f *File) GetNativeWriter() io.Writer

func (*File) Index

func (f *File) Index(key nitro.Value) (nitro.Value, error)

func (*File) IndexRef

func (f *File) IndexRef(key nitro.Value) (nitro.ValueRef, error)

func (*File) String

func (f *File) String() string

func (*File) Traits added in v0.3.0

func (f *File) Traits() vm.Traits

func (*File) Type

func (f *File) Type() string

type PathExpr

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

func ParsePathExpr

func ParsePathExpr(v nitro.Value) (*PathExpr, string, error)

func (*PathExpr) Eval

func (e *PathExpr) Eval(m *nitro.VM, v nitro.Value) (nitro.Value, error)

type Time

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

func NewTime

func NewTime(t time.Time) Time

func (Time) EvalOp

func (t Time) EvalOp(op nitro.Op, operand nitro.Value) (nitro.Value, error)

func (Time) Index

func (t Time) Index(key nitro.Value) (nitro.Value, error)

func (Time) IndexRef

func (t Time) IndexRef(key nitro.Value) (nitro.ValueRef, error)

func (Time) String

func (t Time) String() string

func (Time) Time added in v0.3.0

func (t Time) Time() time.Time

func (Time) Traits added in v0.3.0

func (t Time) Traits() vm.Traits

func (Time) Type

func (t Time) Type() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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