From 4e4370a49918c40da09347cc0a3a6806831fab65 Mon Sep 17 00:00:00 2001 From: Kamil Kisiel Date: Wed, 11 Jan 2023 17:33:11 -0800 Subject: [PATCH] Add a note about `GO111MODULE` (#222) --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 209ee9e..10755ac 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ errcheck is a program for checking for unchecked errors in go programs. errcheck requires Go 1.12 or newer, and depends on the package go/packages from the golang.org/x/tools repository. +errcheck requires module support to be enabled, which is the default in Go 1.13 and later. If installing with Go 1.12 you will need to specify `GO111MODULE=on` if building within `$GOPATH`. + ## Use For basic usage, just give the package path of interest as the first argument: @@ -20,7 +22,7 @@ To check all packages beneath the current directory: errcheck ./... -Or check all packages in your $GOPATH and $GOROOT: +Or check all packages in your `$GOPATH` and `$GOROOT`: errcheck all