fg
github.com/bfirsh/funker-go
go get github.com/bfirsh/funker-go
fg

github.com/bfirsh/funker-go

Funker for Go

by Ben Firshman

v0.0.0-20161231111542-eaa0a2e06f30 (see all)License:Apache-2.0
go get github.com/bfirsh/funker-go
Readme

Funker for Go

A Go implementation of Funker.

## Usage

Defining functions:

package main

import "github.com/bfirsh/funker-go"

type addArgs struct {
  X int `json:"x"`
  Y int `json:"y"`
}

func main() {
    err := funker.Handle(func(args *addArgs) int {
      return args.X + args.Y;
    });
    if err != nil {
      panic(err);
    }
}

Calling functions:

ret, err := funker.Call(addArgs{X: 1, Y: 2});
if err != nil {
  panic(err);
}
fmt.PrintLn(ret);

GitHub Stars

12

LAST COMMIT

5yrs ago

MAINTAINERS

0

CONTRIBUTORS

2

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
v0.0.0-20161231111542-eaa0a2e06f30
3yrs ago
No alternatives found
No tutorials found
Add a tutorial