Last active
August 29, 2015 14:11
-
-
Save liamcurry/5175c5b5559fdc126c6f to your computer and use it in GitHub Desktop.
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 "honnef.co/go/js/console" | |
func main() { | |
console.Log("hello") | |
} |
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 | |
func main() { | |
} |
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 ( | |
"github.com/gopherjs/gopherjs/js" | |
"github.com/gopherjs/websocket" | |
"honnef.co/go/js/console" | |
) | |
func main() { | |
console.Log("hello") | |
master := websocket.New("http://localhost:9001/ws") | |
master.OnOpen(func(obj js.Object) { | |
console.Log("opened", obj) | |
}) | |
} |
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 ( | |
"github.com/gopherjs/gopherjs/js" | |
"github.com/gopherjs/websocket" | |
"honnef.co/go/js/console" | |
) | |
func main() { | |
console.Log("hello") | |
master, err := websocket.New("http://localhost:9001/ws") | |
if err != nil { | |
console.Log("error opening websocket") | |
} else { | |
master.AddEventListener("open", false, func(obj js.Object) { | |
console.Log("opened", obj) | |
}) | |
} | |
} |
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 ( | |
"github.com/gopherjs/gopherjs/js" | |
"github.com/liamcurry/websocket" | |
"honnef.co/go/js/console" | |
) | |
func main() { | |
console.Log("hello") | |
master := websocket.New("http://localhost:9001/ws") | |
master.OnOpen(func(obj js.Object) { | |
console.Log("opened", obj) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment