Closed julianfrank closed 7 years ago
Just noticed in godoc examples that I need to use *rivescript.RiveScript ...instead of rss.Rivescript and remove the rss import... closing this.
Yep, at the moment, the top level package is an abstraction layer for the internal rivescript
package. There are still times when you need to access the internal rivescript.RiveScript
object, however, which is why it’s exported.
Just noting this here to aid future readers.
Yeah. It used to be worse because I had the bulk of the code under /src
to keep the root of the git repo tidy... and so the root package ended up becoming a wrapper around the src
package, so it had its own RiveScript
type that was distinct from the src.RiveScript
type... and so for object macros you had to import the src version and it was extra confusing. (Go 1.9 type aliases may have solved the problem, but I've rearranged the source code by now anyway)
The new code layout is more similar to most other Go libraries that have a "main" type, and a .New()
function that creates that type.
github.com/aichaos/rivescript-go/src does not exist in current repo...and it does not work.. Whats the alternative?