Open hmmftg opened 1 year ago
Hello @hmmftg,
I believe based on your err listing that you're using standard TinyGo compiler, which doesn't have support for net.ResolveXXXAddr. This github project (tinygo-org/net) is an effort to update TinyGo's net package support, but it is not included in standard TinyGo. It will be in the future and it will include support for net.ResolveXXXAddr.
A work-around for you would be to add stubbed out versions of net.ResolveTCPAddr to the tinygo project (tinygo-org/tinygo/src/net). Just to make the compiler happy so you can continue.
An alternate work-around is to try with the development version of TinyGo that includes this github project. I can give you tips on building a custom tinygo if you want to go this route.
@hmmftg, if you don't want to wait for the next release, please try the dev version of TinyGo. It should have support:
sfeldma@nuc:~/work/tinygo/src/net$ grep -r "func Resolve.*Addr" .
./udpsock.go:func ResolveUDPAddr(network, address string) (*UDPAddr, error) {
./tcpsock.go:func ResolveTCPAddr(network, address string) (*TCPAddr, error) {
actually I was thinking about migrating a big rest api written with gin to tiny go, it seems I'm going in wrong path. no?
Hi, I newly started using tiny go, when I tried build my gin project I got these errors:
I don't really need ResolveTCPAddr but if you please add this method to library, I can start using tinygo.