Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e57a024

Browse files
committed
Support Go 1.16 and drop support for Go 1.15
- Document CLI install instructions for Go 1.16 - Update golangci-lint from v1.33.0 to v1.37.0
1 parent 8709f19 commit e57a024

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

.circleci/config.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
version: 2.1
55

66
jobs:
7-
"golang-1_14": &template
7+
"golang-1_15": &template
88
machine:
99
# https://circleci.com/docs/2.0/configuration-reference/#available-machine-images
1010
image: ubuntu-2004:202010-01
@@ -19,7 +19,7 @@ jobs:
1919

2020
environment:
2121
GO111MODULE: "on"
22-
GO_VERSION: "1.14.x"
22+
GO_VERSION: "1.15.x"
2323

2424
steps:
2525
# - setup_remote_docker:
@@ -29,7 +29,7 @@ jobs:
2929
- run: curl -sfL -o ~/bin/golangci-lint.sh https://install.goreleaser.com/github.com/golangci/golangci-lint.sh
3030
- run: chmod +x ~/bin/gimme ~/bin/golangci-lint.sh
3131
- run: eval "$(gimme $GO_VERSION)"
32-
- run: golangci-lint.sh -b ~/bin v1.33.0
32+
- run: golangci-lint.sh -b ~/bin v1.37.0
3333
- checkout
3434
- restore_cache:
3535
keys:
@@ -43,14 +43,14 @@ jobs:
4343
- run: go get github.com/mattn/goveralls
4444
- run: goveralls -service=circle-ci -coverprofile /tmp/coverage/combined.txt
4545

46-
"golang-1_15":
46+
"golang-1_16":
4747
<<: *template
4848
environment:
49-
GO_VERSION: "1.15.x"
49+
GO_VERSION: "1.16.x"
5050

5151
workflows:
5252
version: 2
5353
build:
5454
jobs:
55-
- "golang-1_14"
5655
- "golang-1_15"
56+
- "golang-1_16"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Coverage Status](https://img.shields.io/coveralls/github/golang-migrate/migrate/master.svg)](https://coveralls.io/github/golang-migrate/migrate?branch=master)
44
[![packagecloud.io](https://img.shields.io/badge/deb-packagecloud.io-844fec.svg)](https://packagecloud.io/golang-migrate/migrate?filter=debs)
55
[![Docker Pulls](https://img.shields.io/docker/pulls/migrate/migrate.svg)](https://hub.docker.com/r/migrate/migrate/)
6-
![Supported Go Versions](https://img.shields.io/badge/Go-1.14%2C%201.15-lightgrey.svg)
6+
![Supported Go Versions](https://img.shields.io/badge/Go-1.15%2C%201.16-lightgrey.svg)
77
[![GitHub Release](https://img.shields.io/github/release/golang-migrate/migrate.svg)](https://github.com/golang-migrate/migrate/releases)
88
[![Go Report Card](https://goreportcard.com/badge/github.com/golang-migrate/migrate)](https://goreportcard.com/report/github.com/golang-migrate/migrate)
99

cmd/migrate/README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,21 @@ $ apt-get install -y migrate
4141
$ go get -u -d github.com/golang-migrate/migrate/cmd/migrate
4242
$ cd $GOPATH/src/github.com/golang-migrate/migrate/cmd/migrate
4343
$ git checkout $TAG # e.g. v4.1.0
44+
$ # Go 1.15 and below
4445
$ go build -tags 'postgres' -ldflags="-X main.Version=$(git describe --tags)" -o $GOPATH/bin/migrate $GOPATH/src/github.com/golang-migrate/migrate/cmd/migrate
46+
$ # Go 1.16+
47+
$ go install -tags 'postgres' -o $GOPATH/bin/migrate github.com/golang-migrate/migrate/v4/cmd/migrate@$TAG
4548
```
4649

4750
#### Unversioned
4851

4952
```bash
53+
$ # Go 1.15 and below
5054
$ go get -tags 'postgres' -u github.com/golang-migrate/migrate/cmd/migrate
55+
$ # Go 1.16+
56+
$ go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
5157
```
5258

53-
[Make sure](https://github.com/golang-migrate/migrate/pull/257#issuecomment-705249902) you're not installing the `migrate` CLI from a module. e.g. there should not be any `go.mod` files in your current directory or any directory from your current one to the root
54-
5559
#### Notes
5660

5761
1. Requires a version of Go that [supports modules](https://golang.org/cmd/go/#hdr-Preliminary_module_support). e.g. Go 1.11+
@@ -62,6 +66,7 @@ correspond to the names of the sub-packages underneath the
6266
[`database`](../database) package.
6367
1. Similarly to the database build tags, if you need to support other sources, use the appropriate build tag(s).
6468
1. Support for build constraints will be removed in the future: https://github.com/golang-migrate/migrate/issues/60
69+
1. For versions of Go 1.15 and lower, [make sure](https://github.com/golang-migrate/migrate/pull/257#issuecomment-705249902) you're not installing the `migrate` CLI from a module. e.g. there should not be any `go.mod` files in your current directory or any directory from your current directory to the root
6570

6671
## Usage
6772

0 commit comments

Comments
 (0)