To get started, see the following example:
package main
import (
"os"
"github.com/dazeus/dazeus-go"
)
func main() {
connStr := "unix:/tmp/dazeus.sock"
if len(os.Args) > 1 {
connStr = os.Args[1]
}
dz, err := dazeus.Connect(connStr)
if err != nil {
panic(err)
}
_, err = dz.Subscribe(dazeus.EventPrivMsg, func(evt dazeus.Event) {
evt.Reply(evt.Params[3], false)
})
if err != nil {
panic(err)
}
dz.Listen()
}