Go to file
2024-11-08 16:14:34 +08:00
.gitignore 1 2024-10-11 10:14:56 +08:00
console_test.go 1 2024-10-11 10:14:56 +08:00
console.go fix bug for print nil 2024-11-08 16:14:34 +08:00
console.ts 1 2024-10-11 10:14:56 +08:00
go.mod fix bug for print nil 2024-11-08 16:14:34 +08:00
LICENSE 1 2024-10-11 10:14:56 +08:00
README.md update README 2024-10-11 10:39:10 +08:00

console for GoJS

usage

import (
  "apigo.cc/gojs"
  _ "apigo.cc/gojs/console"
)

func main() {
  r, err := gojs.Run(`
import console from 'apigo.cc/gojs/console'

function main(args){
  console.info('hello 123')
}
  `, "test.js")

    fmt.Println(r, err)
}

module.exports

function print(...data: any[]): void {}
function println(...data: any[]): void {}
function log(...data: any[]): void {}
function debug(...data: any[]): void {}
function info(...data: any[]): void {}
function warn(...data: any[]): void {}
function error(...data: any[]): void {}
function input(...data: any[]): string {return ''}

function black(...data: any[]): string {return ''}
function red(...data: any[]): string {return ''}
function green(...data: any[]): string {return ''}
function yellow(...data: any[]): string {return ''}
function blue(...data: any[]): string {return ''}
function magenta(...data: any[]): string {return ''}
function cyan(...data: any[]): string {return ''}
function white(...data: any[]): string {return ''}
function dim(...data: any[]): string {return ''}
function italic(...data: any[]): string {return ''}
function bBlack(...data: any[]): string {return ''}
function bRed(...data: any[]): string {return ''}
function bGreen(...data: any[]): string {return ''}
function bYellow(...data: any[]): string {return ''}
function bBlue(...data: any[]): string {return ''}
function bMagenta(...data: any[]): string {return ''}
function bCyan(...data: any[]): string {return ''}
function bWhite(...data: any[]): string {return ''}

full api see console.ts