Add Go snippets

This commit is contained in:
Erdem Yerebasmaz
2023-11-06 18:24:04 +03:00
committed by Erdem Yerebasmaz
parent f65bcc1653
commit dc64895b65
31 changed files with 513 additions and 213 deletions

View File

@@ -0,0 +1,27 @@
package example
import (
"log"
)
func ListFiatCurrencies() {
// ANCHOR: list-fiat-currencies
if fiatCurrencies, err := sdk.ListFiatCurrencies(); err == nil {
log.Printf("%#v", fiatCurrencies)
}
// ANCHOR_END: list-fiat-currencies
}
func FetchFiatRates() {
// ANCHOR: fetch-fiat-rates
if fiatRates, err := sdk.FetchFiatRates(); err == nil {
log.Printf("%#v", fiatRates)
}
// ANCHOR_END: fetch-fiat-rates
}
func GetFiatCurrenciesAndRates() {
// ANCHOR: get-fiat-currencies-and-rates
// TODO
// ANCHOR_END: get-fiat-currencies-and-rates
}