Files
m3o-go/examples/function/call/callAFunction/main.go
2021-11-03 10:19:08 +00:00

19 lines
331 B
Go
Executable File

package main
import (
"fmt"
"os"
"go.m3o.com/function"
)
// Call a function by name
func main() {
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)
}