Skip to content

Commit

Permalink
docs: README minor touchups (#45)
Browse files Browse the repository at this point in the history
* fix discord link
* fix misplaced paste
* b/w -> between
  • Loading branch information
G4Vi authored Dec 6, 2023
1 parent bef8f5f commit 37f121c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This repo houses the Go SDK for integrating with the [Extism](https://extism.org/) runtime. Install this library into your host Go applications to run Extism plugins.

Join the [Discord](https://discord.gg/EGTV8Pxs) and chat with us!
Join the [Extism Discord](https://extism.org/discord) and chat with us!

## Installation

Expand Down Expand Up @@ -63,8 +63,6 @@ func main() {
This plug-in was written in Rust and it does one thing, it counts vowels in a string. As such, it exposes one "export" function: `count_vowels`. We can call exports using [extism.Plugin.Call](https://pkg.go.dev/github.com/extism/go-sdk#Plugin.Call).
Let's add that code to our main func:

// => {"count": 3, "total": 3, "vowels": "aeiouAEIOU"}

```go
func main() {
// ...
Expand All @@ -78,6 +76,7 @@ func main() {

response := string(out)
fmt.Println(response)
// => {"count": 3, "total": 3, "vowels": "aeiouAEIOU"}
}
```

Expand All @@ -92,7 +91,7 @@ All exports have a simple interface of optional bytes in, and optional bytes out

### Plug-in State

Plug-ins may be stateful or stateless. Plug-ins can maintain state b/w calls by the use of variables. Our count vowels plug-in remembers the total number of vowels it's ever counted in the "total" key in the result. You can see this by making subsequent calls to the export:
Plug-ins may be stateful or stateless. Plug-ins can maintain state between calls by the use of variables. Our count vowels plug-in remembers the total number of vowels it's ever counted in the "total" key in the result. You can see this by making subsequent calls to the export:

```go
func main () {
Expand Down

0 comments on commit 37f121c

Please sign in to comment.