An example chat server in golang.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AJ ONeal c5100b35bf bugfixes 6 years ago
public update docs 6 years ago
.gitignore Initial commit 6 years ago
LICENSE Initial commit 6 years ago update tasklist 6 years ago
chatserver-http.go GEFN (good enough for now) 6 years ago
chatserver-telnet.go bugfixes 6 years ago
chatserver.go bugfixes 6 years ago
config.sample.yml even more cleanup 6 years ago


Rudimentary go chat server as a fun project.


git clone

go get
go get

Note: I also copied some code directly from


Start the server

go run -race chatserver*.go -conf ./config.yml

See sample config file at config.sample.yml.

Connect clients

You can connect multiple clients.

telnet localhost 4080

You can also use HTTP.

curl http://localhost:4080

API Docs

The API docs and examples can be seen at http://localhost:4080

Project Approach

I've understood theoretical principles of Go for a long time and I've always loved it. However, most of that came from watching Go Tech Talks and going to meetups.

This is my first Go project and my primary goal was to learn how to use Go for the kinds of things that I'm personally interested in while also satisfying a mix of the requirements and optional add-ons, and show you that I know how to write code and learn.

Criteria Met

  • Works
  • Attention to Detail
    • Security
    • UX
    • Performance
  • Commenting
  • Creativity


  • Good coding style

This is my first Go project so I was learning as I went and trying different approaches. As a result my code style is inconsistent and probably does some things the wrong way (especially confusing since I probably did it the right way in other places).


  • Awesome telnet server
    • Multiple clients can connect
    • Messages are relayed to all clients
    • Includes timestamp, name of client
    • Config file for port and addr
    • Post message
    • List messages
    • Serve Docs
    • Working curl examples
  • Multiplex the same port (because I wanted to learn)
  • E-mail "magic link" authentication (minus the link since it's localhost)

Not Implemented

I don't think these things would be difficult to add, but I was having fun learning lots of other things and I figured Some of these things I didn't implement

  • local log file
  • Rooms
  • Blocking
  • UI for HTTP API