Created
August 15, 2022 15:46
-
-
Save tlindsay/b5e0249dcc9bd456644abfb7c001720f to your computer and use it in GitHub Desktop.
tinygo fetch bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module test | |
go 1.18 | |
require github.com/fastly/compute-sdk-go v0.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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