Skip to content
Permalink
Browse files

Updated some of the exported functions to provide better docs

  • Loading branch information...
rogchap committed Sep 2, 2019
1 parent fc5d9f8 commit 74ceccbebf7fe7dce9e94775c0697392905d148b
Showing with 9 additions and 5 deletions.
  1. +4 −3 README.md
  2. +2 −0 errors.go
  3. +1 −1 isolate.go
  4. +2 −1 v8go.go
@@ -1,6 +1,4 @@
# v8go provides an API to V8 JavaScript Engine

V8 version: 7.6.303.31
# Execute JavaScript from Go`

## Usage

@@ -48,6 +46,9 @@ if err != nil {


## V8 dependancy

V8 version: 7.6.303.31

In order to make `v8go` usable as a standard Go package, prebuilt static libraries of V8
are included for Linux and OSX ie. you *should not* require to build V8 yourself.

@@ -18,6 +18,8 @@ func (e *JSError) Error() string {
return e.Message
}

// Format implements the fmt.Formatter interface to provide a custom formatter
// primarily to output the javascript stack trace with %+v
func (e *JSError) Format(s fmt.State, verb rune) {
switch verb {
case 'v':
@@ -10,7 +10,7 @@ import (

var v8once sync.Once

// An isolate is a JavaScript VM instance with its own heap and
// Isolate is a JavaScript VM instance with its own heap and
// garbage collector. Most applications will create one isolate
// with many V8 contexts for execution.
type Isolate struct {
@@ -1,11 +1,12 @@
/*
Package v8go is an API wrapper to the v8 Javascript engine
Package v8go provides an API to execute JavaScript.
*/
package v8go

// #include "v8go.h"
import "C"

// Version returns the version of the V8 Engine with the -v8go suffix
func Version() string {
return C.GoString(C.Version())
}

0 comments on commit 74ceccb

Please sign in to comment.
You can’t perform that action at this time.