refactor(name): change repository references to golang-wasm

master
ALI Hamza 2021-03-22 23:56:02 +07:00
parent 421c331333
commit be4b312d49
Signed by: hamza
GPG Key ID: 22473A32291F8CB6
3 changed files with 5 additions and 16 deletions

@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>Example</title> <title>Golang-WASM</title>
</head> </head>
<body> <body>

@ -13,19 +13,8 @@ func main() {
<-c <-c
} }
const hello = "Sample value"
func helloName(_ js.Value, args []js.Value) interface{} {
return fmt.Sprintf("Hello, %s!", args[0].String())
}
func setup() { func setup() {
bridge := js.Global().Get("__go_wasm__") fmt.Println("golang-wasm initialized")
bridge.Set("__ready__", true)
bridge.Set("hello", hello)
bridge.Set("helloName", js.FuncOf(helloName))
js.Global() js.Global()
} }

@ -1,11 +1,11 @@
{ {
"name": "go-mod-wasm", "name": "golang-wasm",
"version": "0.1.0", "version": "0.0.1",
"description": "A webpack-based configuration to work with wasm using Go.", "description": "A webpack-based configuration to work with wasm using Go.",
"main": "src/index.js", "main": "src/index.js",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://gitea.teamortix.com/Team-Ortix/go-mod-wasm" "url": "https://gitea.teamortix.com/Team-Ortix/golang-wasm"
}, },
"keywords": [ "keywords": [
"golang", "golang",