From 5452a1d3ef0982ffea95fb9e88e5425b0928c431 Mon Sep 17 00:00:00 2001 From: y-yagi Date: Sat, 1 May 2021 15:13:50 +0900 Subject: [PATCH] Add note about `nomsgpack` tag to the readme (#2703) Co-authored-by: Bo-Yi Wu --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 566e5cc7..6f9178ca 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ Gin is a web framework written in Go (Golang). It features a martini-like API wi - [Benchmarks](#benchmarks) - [Gin v1. stable](#gin-v1-stable) - [Build with jsoniter/go-json](#build-with-json-replacement) + - [Build without `MsgPack` rendering feature](#build-without-msgpack-rendering-feature) - [API Examples](#api-examples) - [Using GET, POST, PUT, PATCH, DELETE and OPTIONS](#using-get-post-put-patch-delete-and-options) - [Parameters in path](#parameters-in-path) @@ -195,6 +196,16 @@ $ go build -tags=jsoniter . $ go build -tags=go_json . ``` +## Build without `MsgPack` rendering feature + +Gin enables `MsgPack` rendering feature by default. But you can disable this feature by specifying `nomsgpack` build tag. + +```sh +$ go build -tags=nomsgpack . +``` + +This is useful to reduce the binary size of executable files. See the [detail information](https://github.com/gin-gonic/gin/pull/1852). + ## API Examples You can find a number of ready-to-run examples at [Gin examples repository](https://github.com/gin-gonic/examples).