Open
Description
Hi,
I am getting a undefined: net.LookupHost
error when trying to compile to WebAssembly using tinygo.
A dependency I have (sprig) uses net.LookupHost
.
I don't intend to call the function that uses that, I am looking to just get it to compile.
Replication:
main.go
:
package main
import (
"fmt"
"github.com/Masterminds/sprig/v3"
)
func main() {
funcMap := sprig.FuncMap()
delete(funcMap, "getHostByName")
lower := funcMap["lower"].(func(string) string)
fmt.Println(lower("HELLO WORLD"))
}
tinygo version
tinygo version 0.35.0 linux/amd64 (using go version go1.21.4 and LLVM version 18.1.2)
GOOS=wasip1 GOARCH=wasm tinygo build -o main.wasm main.go
# github.com/Masterminds/sprig/v3
../../go/pkg/mod/github.com/!masterminds/sprig/[email protected]/network.go:9:18: undefined: net.LookupHost
Thanks in advance.