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