console

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ModuleName = "console"

const ModuleName = "node:console"

Variables

This section is empty.

Functions

func Enable

func Enable(runtime *goscript.Runtime)

func Require

func Require(runtime *goscript.Runtime, module *goscript.Object)

func RequireWithPrinter

func RequireWithPrinter(printer Printer) require.ModuleLoader

Types

type Console

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

type ExecPrinter added in v1.2.1

type ExecPrinter struct {
	Printer
	Lines []string
}

func (*ExecPrinter) Error added in v1.2.1

func (e *ExecPrinter) Error(msg string)

func (*ExecPrinter) Log added in v1.2.1

func (e *ExecPrinter) Log(msg string)

func (*ExecPrinter) Warn added in v1.2.1

func (e *ExecPrinter) Warn(msg string)

type Printer

type Printer interface {
	Log(string)
	Warn(string)
	Error(string)
}

type PrinterFunc

type PrinterFunc func(s string)

func (PrinterFunc) Error

func (p PrinterFunc) Error(s string)

func (PrinterFunc) Log

func (p PrinterFunc) Log(s string)

func (PrinterFunc) Warn

func (p PrinterFunc) Warn(s string)

Jump to

Keyboard shortcuts

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