Closed Molaryy closed 1 week ago
nitpick :
import (
rpcclient "github.com/gnolang/gno/tm2/pkg/bft/rpc/client"
)
rpc, err := rpcclient.NewHTTPClient("<gno.land_remote_endpoint>")
if err != nil {
panic(err)
}
Why don't you also import this one, similar to the crypto
library below ?
nitpick :
import ( rpcclient "github.com/gnolang/gno/tm2/pkg/bft/rpc/client" ) rpc, err := rpcclient.NewHTTPClient("<gno.land_remote_endpoint>") if err != nil { panic(err) }
Why don't you also import this one, similar to the crypto
library
below ?
The import rpcclient is just below the code example in the docs. Or did you mean adding the import before and not after the code example?
nitpick :
import ( rpcclient "github.com/gnolang/gno/tm2/pkg/bft/rpc/client" ) rpc, err := rpcclient.NewHTTPClient("<gno.land_remote_endpoint>") if err != nil { panic(err) }
Why don't you also import this one, similar to the crypto
library
below ?The import rpcclient is just below the code example in the docs. Or did you mean adding the import before and not after the code example?
I just checked the docs link, and it seems the path has already been imported below as you mentioned
In the how to connect a Go app to Gno.land tutorial I got an error when I tried to run this line:
It seems that NewHTTPClient returns 2 values
and in the example we assign only one variable.
I updated the examples with:
There is also a step where
crypto.AddressFromBech32
is used but I didn't found when thecrypto
was imported so I also added it in the doc: