There is no (official) option type in Go in general.
I am also not very sure where you took that function signature for the
mint function from. The only place I could find it was your Github issue
with the exact same contents as this email, and there did not seem to be
a direct parallel in the Go or Rust SDKs.
What I could find, though, was that a number of methods in the Go SDK
appear to be variadic functions, with the variadic argument(?) being
named "options". And, if there were any optional arguments passed, then
they will be used.
Example 1:
https://github.com/aptos-labs/aptos-go-sdk/blob/f3612d50315f593d7d6b02a92a7a73313a0c2461/client.go#L440
Here, the NewClient method can be called with a *http.Client argument to
specify the HTTP client used by the client. If it is not passed, then a
default value is used.
Example 2:
https://github.com/aptos-labs/aptos-go-sdk/blob/f3612d50315f593d7d6b02a92a7a73313a0c2461/nodeClient.go#L597
Here, SimulateTransaction can accept optional arguments to adjust
simulation parameters relating to gas.
Something like this could be done to implement optional arguments in
whatever you're using.
Is there any Go code sample that you could post? Posting snippets of
typescript(?) while asking about Go does not seem very productive.
Rudresh Koranne:
> --
> You received this message because you are subscribed to the Google
> Groups "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
golang-nuts...@googlegroups.com <mailto:
golang-
>
nuts+uns...@googlegroups.com>.
> To view this discussion visit
https://groups.google.com/d/msgid/golang-
> nuts/763c88c2-c8ac-4491-aaf5-508e90d824c6n%
40googlegroups.com <https://
>
groups.google.com/d/msgid/golang-nuts/763c88c2-c8ac-4491-
> aaf5-508e90d824c6n%
40googlegroups.com?utm_medium=email&utm_source=footer>.