mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 22:04:21 +01:00
Add Go snippets
This commit is contained in:
committed by
Erdem Yerebasmaz
parent
f65bcc1653
commit
dc64895b65
27
snippets/go/fiat_currencies.go
Normal file
27
snippets/go/fiat_currencies.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user