1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-23 04:47:02 +00:00

let's see

This commit is contained in:
Gerasimos (Makis) Maropoulos
2021-02-19 08:49:15 +02:00
parent b80bd10903
commit 1243150690
15 changed files with 88 additions and 95 deletions

View File

@@ -0,0 +1,16 @@
// +build js
package main
import (
"fmt"
"syscall/js"
"time"
)
func main() {
// 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)
}