Support passing of regex and functions to Go

Refs: #8, #9