This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/binary" | |
"fmt" | |
"sync" | |
"sync/atomic" | |
"github.com/dgraph-io/badger/v4" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/binary" | |
"fmt" | |
"sync" | |
"github.com/dgraph-io/badger/v4" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
v8 "rogchap.com/v8go" | |
) | |
type v8BuiltIns struct { | |
Object struct { | |
create *v8.Function | |
defineProperty *v8.Function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"go.etcd.io/bbolt" | |
) | |
var bucketName = []byte("MyBucket") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"runtime" | |
"sync" | |
"time" | |
v8 "rogchap.com/v8go" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"runtime" | |
"sync" | |
"time" | |
v8 "rogchap.com/v8go" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"runtime" | |
"sync" | |
"time" | |
v8 "rogchap.com/v8go" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
v8 "rogchap.com/v8go" | |
) | |
func main() { | |
iso := v8.NewIsolate() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func main() { | |
m := map[string]int{ | |
"one": 1, | |
} | |
defer func() { | |
fmt.Println("deferred first", m) | |
}() | |
// a function will evaluate upon defer | |
// an expression evaluates immediately | |
defer fmt.Println("deferred second", m) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
func f(x, y, z chan string) { | |
defer close(x) | |
a := make(chan bool) | |
go func() { | |
for i := 0; i < 3; i++ { | |
x <- "hi" |
NewerOlder