https://github.com/mashiike/evaluator
https://github.com/mashiike/evaluator
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mashiike/evaluator
- Owner: mashiike
- License: mit
- Created: 2021-10-30T06:59:32.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-22T20:58:20.000Z (about 2 years ago)
- Last Synced: 2024-05-01T16:15:21.845Z (about 1 year ago)
- Language: Go
- Size: 48.8 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# evaluator
[](https://github.com/mashiike/evaluator/tags)
[](LICENSE.md)

[](https://goreportcard.com/report/github.com/mashiike/evaluator)
[](http://godoc.org/github.com/mashiike/evaluator)A simple library for expression evaluation.
### SYNOPSIS```golang
e, err := evaluator.New("(var1 + 0.5) * var2")
if err != nil {
log.Fatal(err)
}
ans, err := e.Eval(evaluator.Variables{"var1": 0.5, "var2": 3})
if err != nil {
log.Fatal(err)
}
fmt.Println(ans)
```see [godoc.org/github.com/mashiike/evaluator](https://godoc.org/github.com/mashiike/evaluator).
## Author
Copyright (c) 2021 Mashiike.
## LICENSE
MIT