Simple single-channel chat app written in Go.
Golang compiler and tools (v1.5 or later) are required. See the official Getting Started guide or your distro's docs for detailed instructions.
go get -u github.com/utrack/go-simple-chat/cmd/gosimplechat
If you're using Go < 1.6 - you need to set envvar GO15VENDOREXPERIMENT
to 1
before go-getting:
GO15VENDOREXPERIMENT=1 go get -u github.com/utrack/go-simple-chat/cmd/gosimplechat
Check that your PATH
envvar has $GOPATH\bin
and run the command:
gosimplechat
Open your browser, navigate to localhost:8080
and chat away!
Use flag -log debug
for more verbose logging.
go test github.com/utrack/go-simple-chat/...
Tests are written using the GoConvey framework. If you have goconvey
tools installed in your $PATH
, cd to the project's path and run goconvey
to use its web interface.
- replay last
n
messages, push them to the ring buffer and play on join - group clients by their type to avoid unneccessary marshalling (hub(core)->groups(marshalling)->sessions(conn control)->clients(socket/interface level)