Skip to content

Commit f6f7dc5

Browse files
authored
fix: build command
1 parent a33ec1b commit f6f7dc5

File tree

1 file changed

+3
-3
lines changed
  • component-model/src/language-support

1 file changed

+3
-3
lines changed

component-model/src/language-support/go.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ The `adder.exports.go` file contains the exported functions that need to be impl
9797
package main
9898

9999
import (
100-
"example.com/internal/example/component/example"
100+
"example.com/internal/docs/adder/adder"
101101
)
102102

103103
func init() {
104-
example.Exports.Add = func(x int32, y int32) int32 {
104+
adder.Exports.Add = func(x int32, y int32) int32 {
105105
return x + y
106106
}
107107
}
@@ -120,7 +120,7 @@ We can build our component using TinyGo by specifying the wit-package to be `add
120120
Under the hood, TinyGo invokes `wasm-tools` to embed the WIT file to the module and componentize it.
121121

122122
```console
123-
$ tinygo build -target=wasip2 -o add.wasm --wit-package add.wit --wit-world adder main.go
123+
$ tinygo build -target=wasip2 -o add.wasm --wit-package docs:[email protected] --wit-world adder main.go
124124
```
125125

126126
We now have an add component that satisfies our `adder` world, exporting the `add` function, which

0 commit comments

Comments
 (0)