Skip to content

utrack/go-simple-chat

Repository files navigation

go-simple-chat GoDoc

GitHub license Go Report Card Build Status

Simple single-channel chat app written in Go.

Requirements

Golang compiler and tools (v1.5 or later) are required. See the official Getting Started guide or your distro's docs for detailed instructions.

Installation

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

Running

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.

Testing

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.

TODO

  • 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)

About

Simple single-channel chat app written in Go.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published