Created
September 26, 2019 10:42
-
-
Save ludomikula/e149cbb14f68c5d2b38cc0b7b148c029 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/cmd/restic/main.go b/cmd/restic/main.go | |
index e61547c5..f9e8cfaa 100644 | |
--- a/cmd/restic/main.go | |
+++ b/cmd/restic/main.go | |
@@ -1,5 +1,7 @@ | |
package main | |
+import "C" | |
+ | |
import ( | |
"bufio" | |
"bytes" | |
@@ -109,3 +111,13 @@ func main() { | |
Exit(exitCode) | |
} | |
+ | |
+//export run | |
+func run(args []string) (success bool) { | |
+ cmdRoot.SetArgs(args) | |
+ err := cmdRoot.Execute() | |
+ if err != nil { | |
+ return false | |
+ } | |
+ return true | |
+} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment