From 111f0e2df01e8ddfe7bff22762e25c4dc57ab2f8 Mon Sep 17 00:00:00 2001 From: Klaus Post Date: Thu, 13 Aug 2026 12:05:03 +0200 Subject: [PATCH] Suggest go tool usage in Quickstart Updated instructions for installing and using the msgp generator command. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b2d91649..cc1f8ee6 100644 --- a/README.md +++ b/README.md @@ -18,15 +18,15 @@ This is a code generation tool and serialization library for [MessagePack](http: ### Quickstart -First install the `msgp` generator command. Using Go this is done with `go install github.com/tinylib/msgp@latest` +First add `msgp` generator command as a go tool. Using Go this is done with `go mod edit -tool=github.com/tinylib/msgp&&go mod tidy` In a source file, include the following directive: ```go -//go:generate msgp +//go:generate go tool msgp ``` -The `msgp` command will generate serialization methods for all exported type declarations in the file. +The `go tool msgp` command will generate serialization methods for all exported type declarations in the file. You can [read more about the code generation options here](http://github.com/tinylib/msgp/wiki/Using-the-Code-Generator).