v0.3.0 - Apr 30, 2017
This update brings some long-needed restructuring to the source layout of
rivescript-go
. Briefly: it moves all source files from the src/
subpackage
into the root package namespace, and removes the wrapper shim functions (their
documentation was then moved to the actual implementation functions).
API Breaking Changes
-
The
github.com/aichaos/rivescript-go/src
subpackage has been removed, and
all of the things you used to import from there can now be found in the root
package instead. Most notably, theRiveScript
struct needed to be imported
(again) from thesrc
subpackage for use with Go object macros.To update source code where you used Go object macros:
import ( "github.com/aichaos/rivescript-go" - rss "github.com/aichaos/rivescript-go/src" ) func main() { bot = rivescript.New(nil) - subroutine := func(rs *rss.RiveScript, args []string) string { + subroutine := func(rs *rivescript.RiveScript, args []string) string { return "Hello world" } bot.SetSubroutine("hello", subroutine) }
-
rivescript.Version
is now a string constant (replacingVERSION
). The
instance methodVersion()
has been removed.
Changes
- All RiveScript unit tests have been removed in favor of those from the
RiveScript Test Suite. The test file
rsts_test.go
implements the Go test runner, and thersts
repo was added
as a Git submodule. - The Git commit hash is now encoded into the front-end command line client,
printed along with the version number in the welcome banner.