A simple multi-user chat application built with Go (Golang).
This project demonstrates Go's concurrency features (goroutines, channels, mutex)
by creating a real-time terminal-based chatroom over TCP.
- Multi-client support (chatroom style)
- Username registration
- Real-time messaging
- Broadcast system to all connected users
- Join/leave notifications
- Ignores empty messages for clean output
group_chat_go/ │── server.go # Chat server │── client.go # Chat client
git clone https://github.com/your-username/group_chat_go.git
cd group_chat_go
go run server.go
go run client.go
You can start multiple clients in different terminals, all connecting to the same server.
# Terminal 1 (server) Chat server started on :8080 New client joined: Alice New client joined: BobEnter your username: Alice Bob joined the chat Bob: Hello Alice! Alice: Hi Bob!
Enter your username: Bob Alice: Hi Bob! Bob: Hello Alice!
- Go 1.23+