diff --git a/example/basic/dist/index.html b/example/basic/dist/index.html index b2ca710..cf32bbc 100644 --- a/example/basic/dist/index.html +++ b/example/basic/dist/index.html @@ -3,7 +3,7 @@ - Example + Golang-WASM diff --git a/example/basic/src/api/main.go b/example/basic/src/api/main.go index 5e6c8bf..afdcb7e 100644 --- a/example/basic/src/api/main.go +++ b/example/basic/src/api/main.go @@ -13,19 +13,8 @@ func main() { <-c } -const hello = "Sample value" - -func helloName(_ js.Value, args []js.Value) interface{} { - return fmt.Sprintf("Hello, %s!", args[0].String()) -} - func setup() { - bridge := js.Global().Get("__go_wasm__") - - bridge.Set("__ready__", true) - - bridge.Set("hello", hello) - bridge.Set("helloName", js.FuncOf(helloName)) + fmt.Println("golang-wasm initialized") js.Global() } diff --git a/package.json b/package.json index b5d9165..4d2f981 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { - "name": "go-mod-wasm", - "version": "0.1.0", + "name": "golang-wasm", + "version": "0.0.1", "description": "A webpack-based configuration to work with wasm using Go.", "main": "src/index.js", "repository": { "type": "git", - "url": "https://gitea.teamortix.com/Team-Ortix/go-mod-wasm" + "url": "https://gitea.teamortix.com/Team-Ortix/golang-wasm" }, "keywords": [ "golang",