Bump go version to 1.16 (#379)

* Revert "use ioutil.ReadFile to release dependency of Go 1.16 (#217)"

This reverts commit aadf3cf627.

Signed-off-by: Sandy Xu <sandy@juicedata.io>

* use go 1.16 for examples

Signed-off-by: Sandy Xu <sandy@juicedata.io>
This commit is contained in:
Sandy Xu 2021-11-18 22:06:13 +08:00 committed by GitHub
parent e0bf24b24d
commit b0d9bb8821
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 16 additions and 17 deletions

View File

@ -15,7 +15,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15
go-version: 1.16
- name: Test
run: go test ./...
@ -28,7 +28,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15
go-version: 1.16
- name: Test with race
run: go test -race ./...
@ -42,7 +42,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15
go-version: 1.16
- name: Lint
uses: golangci/golangci-lint-action@v2

View File

@ -37,7 +37,7 @@ package config
import (
"crypto/tls"
"crypto/x509"
"io/ioutil"
"os"
"github.com/pkg/errors"
)
@ -66,7 +66,7 @@ func (s *Security) ToTLSConfig() (tlsConfig *tls.Config, err error) {
certPool := x509.NewCertPool()
// Create a certificate pool from the certificate authority
var ca []byte
ca, err = ioutil.ReadFile(s.ClusterSSLCA)
ca, err = os.ReadFile(s.ClusterSSLCA)
if err != nil {
err = errors.Errorf("could not read ca certificate: %s", err)
return

View File

@ -35,7 +35,6 @@
package config
import (
"io/ioutil"
"os"
"path/filepath"
"runtime"
@ -50,8 +49,8 @@ func TestTLSConfig(t *testing.T) {
keyFile := filepath.Join(filepath.Dir(localFile), "key.pem")
perm := os.FileMode(0666)
assert.Nil(t, ioutil.WriteFile(certFile, []byte(cert), perm))
assert.Nil(t, ioutil.WriteFile(keyFile, []byte(key), perm))
assert.Nil(t, os.WriteFile(certFile, []byte(cert), perm))
assert.Nil(t, os.WriteFile(keyFile, []byte(key), perm))
security := Security{
ClusterSSLCA: certFile,

View File

@ -1,6 +1,6 @@
module gcworker
go 1.15
go 1.16
require github.com/tikv/client-go/v2 v2.0.0

View File

@ -1,6 +1,6 @@
module rawkv
go 1.15
go 1.16
require github.com/tikv/client-go/v2 v2.0.0

View File

@ -1,6 +1,6 @@
module 1pc_txn
go 1.15
go 1.16
require github.com/tikv/client-go/v2 v2.0.0

View File

@ -1,6 +1,6 @@
module async_commit
go 1.15
go 1.16
require github.com/tikv/client-go/v2 v2.0.0

View File

@ -1,6 +1,6 @@
module delete_range
go 1.15
go 1.16
require github.com/tikv/client-go/v2 v2.0.0

View File

@ -1,6 +1,6 @@
module txnkv
go 1.15
go 1.16
require github.com/tikv/client-go/v2 v2.0.0

View File

@ -1,6 +1,6 @@
module pessimistic_txn
go 1.15
go 1.16
require github.com/tikv/client-go/v2 v2.0.0

View File

@ -1,6 +1,6 @@
module unsafedestoryrange
go 1.15
go 1.16
require github.com/tikv/client-go/v2 v2.0.0

2
go.mod
View File

@ -1,6 +1,6 @@
module github.com/tikv/client-go/v2
go 1.15
go 1.16
require (
github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548