Skip to content

Docs: update install instructions for Go 1.17+ and mention distro packages #1315

@sauryagur

Description

@sauryagur

The current install docs still reference go get and GOPATH workflows, which have been deprecated since Go 1.17. Following them on a modern Go toolchain results in errors like:

go: -d flag is deprecated. -d=true is a no-op
go: go.mod file not found in current directory or any parent directory.
	'go get' is no longer supported outside a module.
	To build and install a command, use 'go install' with a version,
	like 'go install example.com/cmd@latest'
	For more information, see https://golang.org/doc/go-get-install-deprecation
	or run 'go help get' or 'go help install'.

The recommended install is:

# Latest version with postgres support
go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest

# Or pin a version
go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@v4.17.0

Additionally, Fedora users can install migrate via the package manager:

sudo dnf install migrate

Proposal:

  • Replace go get instructions with go install examples (Go ≥1.17).
  • Add a small “Linux distro packages” section mentioning Fedora’s dnf package and leaving room for others (brew, apt, etc.).

Happy to open a PR with these changes if this direction makes sense.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions