-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(docs): fix example rpcclient.NewHTTPClient returning variables #2352
Conversation
…ariables returned
…ariables returned
nitpick :
Why don't you also import this one, similar to the |
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 |
…nolang#2352) In the [how to connect a Go app to Gno.land](https://docs.gno.land/how-to-guides/connect-from-go) tutorial I got an error when I tried to run this line: ```go rpc := rpcclient.NewHTTPClient("<gno_chain_endpoint>") ``` It seems that NewHTTPClient returns 2 values ```go func NewHTTPClient(rpcURL string) (*RPCClient, error); ``` and in the example we assign only one variable. I updated the examples with: ```go rpc, err := rpcclient.NewHTTPClient("<gno.land_remote_endpoint>") if err != nil { panic(err) } ``` There is also a step where `crypto.AddressFromBech32` is used but I didn't found when the `crypto` was imported so I also added it in the doc: ```go import ( ... crypto "github.com/gnolang/gno/tm2/pkg/crypto" ) ``` --------- Co-authored-by: Morgan <git@howl.moe>
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: