lib

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2022 License: MIT Imports: 32 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")

Functions

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 RegisterAll

func RegisterAll(c *nitro.Compiler)

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 (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) Index

func (d Duration) Index(key nitro.Value) (nitro.Value, error)

func (Duration) IndexRef

func (d Duration) IndexRef(key nitro.Value) (nitro.ValueRef, error)

func (Duration) String

func (d Duration) String() string

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) EvalOp

func (f *File) EvalOp(op nitro.Op, operand nitro.Value) (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) 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) 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