项目作者: lujjjh

项目描述 :
An embedded language for Go.
高级语言: Go
项目地址: git://github.com/lujjjh/gates.git
创建时间: 2018-10-26T17:04:39Z
项目社区:https://github.com/lujjjh/gates

开源协议:MIT License

下载


Gates

An embedded language for Go.

Features

  • Easily embedded in Go.
  • JavaScript-like syntax with native int64 support.
  • First class functions.
  • Execution time limit.

Comparision

Gates Lua 5.3+ JavaScript
Int64 support Y Y N
Compatible with JSON Y N (hard to distinguish between [] and {}) Y
Easily embedded in Go Y N N

Try Gates in Command Line

  1. $ go get -u github.com/lujjjh/gates/cmd/gates
  2. $ echo '[1, 2, 3] | map(x => x * x)' | gates
  3. # 1,4,9

Data Types

  • number (int64 / float64)
  • string
  • bool
  • map
  • array
  • function

Examples

View Examples

Credits