Files
m3o-go/examples/function/call/callAFunction.go
2021-10-29 06:38:17 +00:00

19 lines
354 B
Go
Executable File

package example
import (
"fmt"
"os"
"github.com/go.m3o.com/function"
)
// Call a function by name
func CallAfunction() {
functionService := function.NewFunctionService(os.Getenv("M3O_API_TOKEN"))
rsp, err := functionService.Call(&function.CallRequest{
Name: "my-first-func",
Request: map[string]interface{}{},
})
fmt.Println(rsp, err)
}