A lightweight backend service simulation for a coffee shop, built with Go (Golang). This is a learning project focused on mastering the core concepts of Go development.
This service demonstrates how to handle orders, apply discounts using pointer receivers, and prepare data for frontend consumption using JSON serialization.
- Data Modeling: Custom
Orderstruct with JSON tags for seamless integration. - Pointers in Action: Efficient state management using pointer receivers (modifying order status and price).
- Clean Code: Separation of concerns between models and main logic.
- JSON Marshaling: Formatted JSON output for order receipts.
- Language: Go 1.2x+
- Standard Library:
encoding/json,fmt,log
- Clone this repository:
git clone [https://github.com/Endropr/go-coffee-service-Pet.git](https://github.com/Endropr/go-coffee-service-Pet.git)
- Navigate to the project folder:
cd go-coffee-service-Pet - Run the application:
go run .
-
Building this project helped me understand:
-
How Go handles data structures.
-
The difference between value and pointer receivers.
-
How to structure a multi-file Go package.
-
Basic Git workflow and repository management.
Created by Endropr as part of the Go learning journey.