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,16 @@
package example
import (
"log"
"github.com/breez/breez-sdk-go/breez_sdk"
)
func RetrieveBackupFiles() {
// ANCHOR: static-channel-backup
workingDir := "<working directory>"
if staticBackupResponse, err := breez_sdk.StaticBackup(breez_sdk.StaticBackupRequest{WorkingDir: workingDir}); err == nil {
log.Printf("%#v", staticBackupResponse)
}
// ANCHOR_END: static-channel-backup
}