librclone: add tests for build and execute them in the actions #4891

This commit is contained in:
Nick Craig-Wood
2021-03-30 11:37:59 +01:00
parent f38c262471
commit 62bf63d36f
4 changed files with 74 additions and 8 deletions

View File

@@ -79,7 +79,7 @@ func RcloneFinalize() {
//
// Output will be returned as a serialized JSON object
// Status is a HTTP status return (200=OK anything else fail)
type RcloneRPCResult struct {
type RcloneRPCResult struct { //nolint:deadcode
Output *C.char
Status C.int
}
@@ -113,12 +113,12 @@ type RcloneMobileRPCResult struct {
Status int
}
// RcloneMobileRPCRPC this works the same as RcloneRPC but has an interface
// RcloneMobileRPC works the same as RcloneRPC but has an interface
// optimised for gomobile, in particular the function signature is
// valid under gobind rules.
//
// https://pkg.go.dev/golang.org/x/mobile/cmd/gobind#hdr-Type_restrictions
func RcloneMobileRPCRPC(method string, input string) (result RcloneMobileRPCResult) {
func RcloneMobileRPC(method string, input string) (result RcloneMobileRPCResult) { //nolint:deadcode
output, status := callFunctionJSON(method, input)
result.Output = output
result.Status = status