You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently our example code (for example StreamPayments) shows code running inside our Go SDK package, but anyone else will be running code outside the package. This means that they will need to properly qualify all the classes and methods, add the proper imports. This makes it far harder to just copy/paste/run examples. We should have the examples be fully qualified.
we should put our examples in a separate files, something like examples_test.go, and at the top of the file, change package wonderfulthings to package wonderfulthings_test.
it will mean you’ll need to import github.com/stellar/wonderfulthings and throughout the code you’ll reference functions, types, etc as wonderfulthings.AmazingType.
The text was updated successfully, but these errors were encountered:
Here's a good example of an example test for the go sort package. It lives inside the same directory as the sort code, but is given the special _test suffix to tell the compiler we want the code built as if it's external to the package.
Currently our example code (for example StreamPayments) shows code running inside our Go SDK package, but anyone else will be running code outside the package. This means that they will need to properly qualify all the classes and methods, add the proper imports. This makes it far harder to just copy/paste/run examples. We should have the examples be fully qualified.
From @leighmcculloch :
The text was updated successfully, but these errors were encountered: