1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-20 03:17:04 +00:00

Iris + WebAssemply = = 💓

Former-commit-id: 44f08f112cfba8006d2a6fe34e32b24e5c246856
This commit is contained in:
Gerasimos (Makis) Maropoulos
2018-07-09 09:13:36 +03:00
parent 0297afdc6b
commit cd5109ae0e
9 changed files with 485 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
// +build go1.11beta1
package main
import (
"fmt"
"syscall/js"
"time"
)
func main() {
// GOARCH=wasm GOOS=js /home/$yourusername/go1.11beta1/bin/go build -o hello.wasm hello_go11beta1.go
js.Global().Get("console").Call("log", "Hello WebAssemply!")
message := fmt.Sprintf("Hello, the current time is: %s", time.Now().String())
js.Global().Get("document").Call("getElementById", "hello").Set("innerText", message)
}