Skip to content

Instantly share code, notes, and snippets.

@tlindsay
Created August 15, 2022 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tlindsay/b5e0249dcc9bd456644abfb7c001720f to your computer and use it in GitHub Desktop.
Save tlindsay/b5e0249dcc9bd456644abfb7c001720f to your computer and use it in GitHub Desktop.
tinygo fetch bug
# tinygo version 0.25.0 darwin/amd64 (using go version go1.18 and LLVM version 14.0.0)
# go version go1.18.3 darwin/arm64
tinygo build -wasm-abi=generic -target=wasi -o bin/main.wasm main.go
module test
go 1.18
require github.com/fastly/compute-sdk-go v0.1.1
package main
import (
"fmt"
"github.com/fastly/compute-sdk-go/fsthttp"
)
func main() {
fmt.Println("Hello, world!")
fsthttp.ServeFunc(func(_ctx context.Context, _w fsthttp.ResponseWriter, r *fsthttp.Request) {
fmt.Println(r.URL.String())
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment