mirror of
https://github.com/kataras/iris.git
synced 2025-12-27 14:57:05 +00:00
let's see
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
// GOARCH=wasm GOOS=js /home/$yourusername/go1.14/bin/go build -o hello.wasm hello_go114.go
|
||||
// GOARCH=wasm GOOS=js /home/$yourusername/go1.16/bin/go build -mod=mod -o hello.wasm hello_go116.go
|
||||
js.Global().Get("console").Call("log", "Hello Webassembly!")
|
||||
message := fmt.Sprintf("Hello, the current time is: %s", time.Now().String())
|
||||
js.Global().Get("document").Call("getElementById", "hello").Set("innerText", message)
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
)
|
||||
|
||||
/*
|
||||
You need to build the hello.wasm first, download the go1.14 and execute the below command:
|
||||
$ cd client && GOARCH=wasm GOOS=js /home/$yourname/go1.14/bin/go build -o hello.wasm hello_go114.go
|
||||
You need to build the hello.wasm first, download the go1.16 and execute the below command:
|
||||
$ cd client && GOARCH=wasm GOOS=js /home/$yourname/go1.16/bin/go build -mod=mod -o hello.wasm hello_go116.go
|
||||
*/
|
||||
|
||||
func main() {
|
||||
|
||||
Reference in New Issue
Block a user