Console

package
v0.0.0-...-3e87f45 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2022 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Overview

* @Author: NyanCatda * @Date: 2022-03-22 01:27:22 * @LastEditTime: 2022-03-22 18:00:46 * @LastEditors: NyanCatda * @Description: 控制台函数注册 * @FilePath: \Momizi\Internal\Plugin\JavaScript\Tools\Console\Console.go

* @Author: NyanCatda * @Date: 2022-03-22 01:28:05 * @LastEditTime: 2022-03-22 17:59:24 * @LastEditors: NyanCatda * @Description: 日志输出函数注册 * @FilePath: \Momizi\Internal\Plugin\JavaScript\Tools\Console\Log.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegistrationFunction

func RegistrationFunction(VM *goja.Runtime) error

*

  • @description: 注册控制台函数
  • @param {*goja.Runtime} VM
  • @return {*}

Types

type Console

type Console struct {
	VM *goja.Runtime
}

func (Console) Debug

func (Console Console) Debug(Text string) error

*

  • @description: 打印Debug Log
  • @param {string} Text 日志内容F
  • @return {*}

func (Console) Error

func (Console Console) Error(Text string) error

*

  • @description: 打印错误Log
  • @param {string} Text 日志内容
  • @return {*}

func (Console) Log

func (Console Console) Log(Text string) error

*

  • @description: 打印Log
  • @param {string} Text 日志内容
  • @return {*}

func (Console) SetColor

func (Console Console) SetColor(Color string, Text string) string

*

  • @description: 设置输出文字颜色
  • @param {string} Color 颜色 Black/Red/Green/Yellow/Blue/Magenta/Cyan/White
  • @param {string} Text 文字
  • @return {*}

func (Console) Warning

func (Console Console) Warning(Text string) error

*

  • @description: 打印警告Log
  • @param {string} Text 日志内容
  • @return {*}

Jump to

Keyboard shortcuts

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