From 1a2847d302ab87b91d5365cf9c0b68b63dc13414 Mon Sep 17 00:00:00 2001 From: Alex Bozhenko <alexbozhenko@users.noreply.github.com> Date: Thu, 5 Dec 2024 11:03:24 -0800 Subject: [PATCH] [IMPROVED] Update installation commands (#1745) 1. The info about pre go modules is not relevant anymore, so drop it. 2. Extra slashes are not needed before the version suffix, per https://go.dev/ref/mod#go-install. So make it consistent. Signed-off-by: Alex Bozhenko <alex@synadia.com> --- README.md | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 84accda65..7980eccbb 100644 --- a/README.md +++ b/README.md @@ -19,25 +19,14 @@ A [Go](http://golang.org) client for the [NATS messaging system](https://nats.io ## Installation ```bash -# Go client -go get github.com/nats-io/nats.go/ +# To get the latest released Go client: +go get github.com/nats-io/nats.go@latest -# Server -go get github.com/nats-io/nats-server -``` - -When using or transitioning to Go modules support: - -```bash -# Go client latest or explicit version -go get github.com/nats-io/nats.go/@latest -go get github.com/nats-io/nats.go/@v1.37.0 - -# For latest NATS Server, add /v2 at the end -go get github.com/nats-io/nats-server/v2 +# To get a specific version: +go get github.com/nats-io/nats.go@v1.37.0 -# NATS Server v1 is installed otherwise -# go get github.com/nats-io/nats-server +# Note that the latest major version for NATS Server is v2: +go get github.com/nats-io/nats-server/v2@latest ``` ## Basic Usage