From b758ec4717db96c513005a345ff95359754be9fa Mon Sep 17 00:00:00 2001 From: tatakaisun Date: Wed, 20 May 2026 12:52:35 +0900 Subject: [PATCH] docs: add module setup to gin quickstart --- README.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 96b0ae3c10..2da678af5f 100644 --- a/README.md +++ b/README.md @@ -92,14 +92,21 @@ func main() { **Running the application:** 1. Save the code above as `main.go` -2. Run the application: +2. Initialize a Go module and download dependencies: + + ```sh + go mod init example.com/gin-quickstart + go mod tidy + ``` + +3. Run the application: ```sh go run main.go ``` -3. Open your browser and visit [`http://localhost:8080/ping`](http://localhost:8080/ping) -4. You should see: `{"message":"pong"}` +4. Open your browser and visit [`http://localhost:8080/ping`](http://localhost:8080/ping) +5. You should see: `{"message":"pong"}` **What this example demonstrates:**