We want to implement our business logic using Go, but we cannot find any good implementation of rules engine/inference engine for Go. Does anyone have any experience or suggestions?
There is a project that aims to implement an ISO Prolog compiler in Go:
I haven't tested it, but given that it implements some basic Prolog, that should be quite a capable rule-based reasoning engine, AFAIS.
Otherwise, a search for "rule" over at godoc.org also yields a bunch of packages:
The best example of something like this to my knowledge is the 'table-driven' approach to unit tests taken in much of the standard library. For example, the fmttests.
Beyond that, Go is a powerful, expressive language. What do you actually need? There are a number of examples of state machine implementations in Go, and a number of web frameworks with declarative JSON configuration.
If you mean proper logic programming, there's no popular Go library for it yet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With