Skip to content

Commit

Permalink
updated for go1.13
Browse files Browse the repository at this point in the history
  • Loading branch information
itskass committed Apr 10, 2020
1 parent 5d59134 commit 1409183
Show file tree
Hide file tree
Showing 39 changed files with 57 additions and 53 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ More information about Go's WebAssembly support can be found on [Go's WebAssembl
Pull the library and install `wasm-server` (optional):

```
go get -u github.com/dennwc/dom
go install github.com/dennwc/dom/cmd/wasm-server
go get -u github.com/itskass/dom
go install github.com/itskass/dom/cmd/wasm-server
```

Run an example app:

```
cd $GOPATH/src/github.com/dennwc/dom
cd $GOPATH/src/github.com/itskass/dom
wasm-server
```

Expand Down
6 changes: 3 additions & 3 deletions cmd/app/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"sync"
"time"

"github.com/dennwc/dom"
"github.com/dennwc/dom/storage"
"github.com/dennwc/dom/svg"
"github.com/itskass/dom"
"github.com/itskass/dom/storage"
"github.com/itskass/dom/svg"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/wasm-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"strings"
"time"

"github.com/dennwc/dom/internal/goenv"
"github.com/itskass/dom/internal/goenv"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion document.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dom

import "github.com/dennwc/dom/js"
import "github.com/itskass/dom/js"

func GetDocument() *Document {
doc := js.Get("document")
Expand Down
2 changes: 1 addition & 1 deletion element.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package dom
import (
"fmt"

"github.com/dennwc/dom/js"
"github.com/itskass/dom/js"
)

var _ Node = (*Element)(nil)
Expand Down
2 changes: 1 addition & 1 deletion event.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dom

import (
"github.com/dennwc/dom/js"
"github.com/itskass/dom/js"
)

type EventTarget interface {
Expand Down
6 changes: 3 additions & 3 deletions examples/go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module github.com/dennwc/dom/examples
module github.com/itskass/dom/examples

require (
github.com/dennwc/dom v0.2.1
github.com/itskass/dom v0.2.1
github.com/gogo/protobuf v1.1.1
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a
google.golang.org/grpc v1.16.0
)

replace github.com/dennwc/dom => ../
replace github.com/itskass/dom => ../
4 changes: 2 additions & 2 deletions examples/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ github.com/containerd/continuity v0.0.0-20181027224239-bea7585dbfac h1:PThQaO4yC
github.com/containerd/continuity v0.0.0-20181027224239-bea7585dbfac/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dennwc/dom v0.2.1 h1:ADY36S5pLkfm+2l6mWj5XHtt/InVXZROijUG36+lMuY=
github.com/dennwc/dom v0.2.1/go.mod h1:oFVwHbm2UiC3fpTHdNYk78qvsuvdJFnPWSBonoYGdYs=
github.com/itskass/dom v0.2.1 h1:ADY36S5pLkfm+2l6mWj5XHtt/InVXZROijUG36+lMuY=
github.com/itskass/dom v0.2.1/go.mod h1:oFVwHbm2UiC3fpTHdNYk78qvsuvdJFnPWSBonoYGdYs=
github.com/dennwc/testproxy v1.0.1 h1:mQhNVWHPolTYjJrDZYKcugIplWRSlFAis6k/Zf1s0c0=
github.com/dennwc/testproxy v1.0.1/go.mod h1:EHGV9tzWhMPLmEoVJ2KGyC149XqwKZwBDViCjhKD5d8=
github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
Expand Down
6 changes: 3 additions & 3 deletions examples/grpc-over-ws/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (

"google.golang.org/grpc"

"github.com/dennwc/dom"
"github.com/dennwc/dom/examples/grpc-over-ws/protocol"
"github.com/dennwc/dom/net/ws"
"github.com/itskass/dom"
"github.com/itskass/dom/examples/grpc-over-ws/protocol"
"github.com/itskass/dom/net/ws"
)

func dialer(s string, dt time.Duration) (net.Conn, error) {
Expand Down
4 changes: 2 additions & 2 deletions examples/grpc-over-ws/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

"google.golang.org/grpc"

"github.com/dennwc/dom/examples/grpc-over-ws/protocol"
"github.com/dennwc/dom/net/ws"
"github.com/itskass/dom/examples/grpc-over-ws/protocol"
"github.com/itskass/dom/net/ws"
)

//go:generate GOOS=js GOARCH=wasm go build -o app.wasm ./client.go
Expand Down
2 changes: 1 addition & 1 deletion examples/webrtc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"io"
"time"

"github.com/dennwc/dom/net/webrtc"
"github.com/itskass/dom/net/webrtc"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion extension/chrome/bookmarks.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package chrome

import "github.com/dennwc/dom/js"
import "github.com/itskass/dom/js"

type AllBookmarks interface {
GetTree() []BookmarkNode
Expand Down
2 changes: 1 addition & 1 deletion extension/chrome/chrome.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package chrome

import "github.com/dennwc/dom/js"
import "github.com/itskass/dom/js"

var (
chrome = js.Get("chrome")
Expand Down
2 changes: 1 addition & 1 deletion extension/chrome/native/native_js.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"
"io"

"github.com/dennwc/dom/js"
"github.com/itskass/dom/js"
)

// NewApp returns a application instance with a name, as specified in the extension manifest.
Expand Down
2 changes: 1 addition & 1 deletion extension/chrome/tabs.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package chrome

import "github.com/dennwc/dom/js"
import "github.com/itskass/dom/js"

type TabOptions struct {
Active bool
Expand Down
2 changes: 1 addition & 1 deletion global.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package dom
import (
"image"

"github.com/dennwc/dom/js"
"github.com/itskass/dom/js"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/dennwc/dom
module github.com/itskass/dom

go 1.12

Expand Down
2 changes: 1 addition & 1 deletion htmlElement.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dom

import "github.com/dennwc/dom/js"
import "github.com/itskass/dom/js"

// https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement

Expand Down
2 changes: 1 addition & 1 deletion js/js_host_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package js
import (
"testing"

"github.com/dennwc/dom/js/jstest"
"github.com/itskass/dom/js/jstest"
)

func TestJS(t *testing.T) {
Expand Down
8 changes: 6 additions & 2 deletions js/js_wasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,13 @@ func funcOf(fnc func(this Ref, refs []Ref) interface{}) Func {
}

func typedArrayOf(slice interface{}) Ref {
return js.TypedArrayOf(slice).Value
// return js.TypedArrayOf(slice).Value
var ref js.Value
js.CopyBytesToJS(ref, slice.([]byte))
return ref
}

func releaseTypedArray(v Ref) {
js.TypedArray{v}.Release()
// js.TypedArray{v}.Release()
v = js.Null()
}
2 changes: 1 addition & 1 deletion js/jstest/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"os/exec"
"testing"

"github.com/dennwc/dom/internal/goenv"
"github.com/itskass/dom/internal/goenv"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion js/jstest/chrome.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/chromedp/cdproto/runtime"
"github.com/chromedp/chromedp"
"github.com/chromedp/chromedp/client"
"github.com/dennwc/dom/internal/goenv"
"github.com/itskass/dom/internal/goenv"
"github.com/dennwc/testproxy"
"github.com/ory/dockertest"
"github.com/ory/dockertest/docker"
Expand Down
2 changes: 1 addition & 1 deletion js/jstest/nodejs.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/ory/dockertest"
"github.com/ory/dockertest/docker"

"github.com/dennwc/dom/internal/goenv"
"github.com/itskass/dom/internal/goenv"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion net/webrtc/peer_chan.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"sync"
"time"

"github.com/dennwc/dom/js"
"github.com/itskass/dom/js"
)

type peerChannel struct {
Expand Down
4 changes: 2 additions & 2 deletions net/webrtc/peer_conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"sync"
"sync/atomic"

"github.com/dennwc/dom"
"github.com/dennwc/dom/js"
"github.com/itskass/dom"
"github.com/itskass/dom/js"
)

const debug = false
Expand Down
2 changes: 1 addition & 1 deletion net/webrtc/webrtc.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"encoding/json"
"net"

"github.com/dennwc/dom/js"
"github.com/itskass/dom/js"
)

// Peers represents a dynamic list of peers that were discovered via signalling.
Expand Down
2 changes: 1 addition & 1 deletion net/ws/wsconn_js.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"sync"
"time"

"github.com/dennwc/dom/js"
"github.com/itskass/dom/js"
)

var errClosed = errors.New("ws: connection closed")
Expand Down
2 changes: 1 addition & 1 deletion net/ws/wsconn_js_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"
"testing"

"github.com/dennwc/dom/js"
"github.com/itskass/dom/js"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion net/ws/wsconn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package ws

import (
"github.com/dennwc/dom/js/jstest"
"github.com/itskass/dom/js/jstest"
"github.com/stretchr/testify/require"
"net/http"
"net/rpc"
Expand Down
2 changes: 1 addition & 1 deletion node.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dom

import "github.com/dennwc/dom/js"
import "github.com/itskass/dom/js"

type Node interface {
EventTarget
Expand Down
4 changes: 2 additions & 2 deletions require/require.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"strings"
"sync"

"github.com/dennwc/dom"
"github.com/dennwc/dom/js"
"github.com/itskass/dom"
"github.com/itskass/dom/js"
)

var required = make(map[string]error)
Expand Down
2 changes: 1 addition & 1 deletion require/require_js_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package require
import (
"testing"

"github.com/dennwc/dom/js"
"github.com/itskass/dom/js"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion require/require_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package require

import (
"github.com/dennwc/dom/js/jstest"
"github.com/itskass/dom/js/jstest"
"net/http"
"strings"
"testing"
Expand Down
2 changes: 1 addition & 1 deletion shadowRoot.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dom

import "github.com/dennwc/dom/js"
import "github.com/itskass/dom/js"

// https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot

Expand Down
2 changes: 1 addition & 1 deletion storage/storage.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package storage

import (
"github.com/dennwc/dom/js"
"github.com/itskass/dom/js"
)

func getStorage(name string) Storage {
Expand Down
2 changes: 1 addition & 1 deletion style.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dom

import "github.com/dennwc/dom/js"
import "github.com/itskass/dom/js"

type Style struct {
v js.Value
Expand Down
4 changes: 2 additions & 2 deletions svg/svg.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"strings"

"github.com/dennwc/dom"
"github.com/dennwc/dom/js"
"github.com/itskass/dom"
"github.com/itskass/dom/js"
)

// NewElement creates a new SVG element.
Expand Down
2 changes: 1 addition & 1 deletion tokenList.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dom

import "github.com/dennwc/dom/js"
import "github.com/itskass/dom/js"

func AsTokenList(v js.Value) *TokenList {
if !v.Valid() {
Expand Down
2 changes: 1 addition & 1 deletion window.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package dom
import (
"strings"

"github.com/dennwc/dom/js"
"github.com/itskass/dom/js"
)

func GetWindow() *Window {
Expand Down

0 comments on commit 1409183

Please sign in to comment.