# README
go-compatible is a compatibility checker for Go packages.
Installation
go-compatible requires Go 1.16.
go install github.com/perillo/go-compatible@latest
Purpose
go-compatible checks if a package is compatible with older versions of Go.
Internally, it invokes go vet
, go build
or go test
on all the
available releases installed on the system.
The output of this tool reports problems for each release that a package does not support.
Usage
go-compatible [-mode mode] [-since goversion] [packages]
Invoke go-compatible
with one or more import paths. go-compatible uses the
same import path syntax as
the go
command and therefore also supports relative import paths like
./...
. Additionally the ...
wildcard can be used as suffix on relative and
absolute file paths to recurse into them.
The -since
option causes the tool to only use releases more recent than the
specified version.
The -mode
option allows the user to specify how to verify compatibility. It
can be set to vet
, build
or test
, with vet
being the default.
By default, go-compatible
searches the available releases in the ~/sdk
directory, but it is possible to specify a different directory using the
GOSDK
environment variable.