mirror of https://github.com/tikv/client-go.git
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:
parent
e0bf24b24d
commit
b0d9bb8821
|
|
@ -15,7 +15,7 @@ jobs:
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.15
|
go-version: 1.16
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: go test ./...
|
run: go test ./...
|
||||||
|
|
@ -28,7 +28,7 @@ jobs:
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.15
|
go-version: 1.16
|
||||||
|
|
||||||
- name: Test with race
|
- name: Test with race
|
||||||
run: go test -race ./...
|
run: go test -race ./...
|
||||||
|
|
@ -42,7 +42,7 @@ jobs:
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.15
|
go-version: 1.16
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
uses: golangci/golangci-lint-action@v2
|
uses: golangci/golangci-lint-action@v2
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ package config
|
||||||
import (
|
import (
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"crypto/x509"
|
"crypto/x509"
|
||||||
"io/ioutil"
|
"os"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
@ -66,7 +66,7 @@ func (s *Security) ToTLSConfig() (tlsConfig *tls.Config, err error) {
|
||||||
certPool := x509.NewCertPool()
|
certPool := x509.NewCertPool()
|
||||||
// Create a certificate pool from the certificate authority
|
// Create a certificate pool from the certificate authority
|
||||||
var ca []byte
|
var ca []byte
|
||||||
ca, err = ioutil.ReadFile(s.ClusterSSLCA)
|
ca, err = os.ReadFile(s.ClusterSSLCA)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
err = errors.Errorf("could not read ca certificate: %s", err)
|
err = errors.Errorf("could not read ca certificate: %s", err)
|
||||||
return
|
return
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,6 @@
|
||||||
package config
|
package config
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io/ioutil"
|
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
|
@ -50,8 +49,8 @@ func TestTLSConfig(t *testing.T) {
|
||||||
keyFile := filepath.Join(filepath.Dir(localFile), "key.pem")
|
keyFile := filepath.Join(filepath.Dir(localFile), "key.pem")
|
||||||
perm := os.FileMode(0666)
|
perm := os.FileMode(0666)
|
||||||
|
|
||||||
assert.Nil(t, ioutil.WriteFile(certFile, []byte(cert), perm))
|
assert.Nil(t, os.WriteFile(certFile, []byte(cert), perm))
|
||||||
assert.Nil(t, ioutil.WriteFile(keyFile, []byte(key), perm))
|
assert.Nil(t, os.WriteFile(keyFile, []byte(key), perm))
|
||||||
|
|
||||||
security := Security{
|
security := Security{
|
||||||
ClusterSSLCA: certFile,
|
ClusterSSLCA: certFile,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
module gcworker
|
module gcworker
|
||||||
|
|
||||||
go 1.15
|
go 1.16
|
||||||
|
|
||||||
require github.com/tikv/client-go/v2 v2.0.0
|
require github.com/tikv/client-go/v2 v2.0.0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
module rawkv
|
module rawkv
|
||||||
|
|
||||||
go 1.15
|
go 1.16
|
||||||
|
|
||||||
require github.com/tikv/client-go/v2 v2.0.0
|
require github.com/tikv/client-go/v2 v2.0.0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
module 1pc_txn
|
module 1pc_txn
|
||||||
|
|
||||||
go 1.15
|
go 1.16
|
||||||
|
|
||||||
require github.com/tikv/client-go/v2 v2.0.0
|
require github.com/tikv/client-go/v2 v2.0.0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
module async_commit
|
module async_commit
|
||||||
|
|
||||||
go 1.15
|
go 1.16
|
||||||
|
|
||||||
require github.com/tikv/client-go/v2 v2.0.0
|
require github.com/tikv/client-go/v2 v2.0.0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
module delete_range
|
module delete_range
|
||||||
|
|
||||||
go 1.15
|
go 1.16
|
||||||
|
|
||||||
require github.com/tikv/client-go/v2 v2.0.0
|
require github.com/tikv/client-go/v2 v2.0.0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
module txnkv
|
module txnkv
|
||||||
|
|
||||||
go 1.15
|
go 1.16
|
||||||
|
|
||||||
require github.com/tikv/client-go/v2 v2.0.0
|
require github.com/tikv/client-go/v2 v2.0.0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
module pessimistic_txn
|
module pessimistic_txn
|
||||||
|
|
||||||
go 1.15
|
go 1.16
|
||||||
|
|
||||||
require github.com/tikv/client-go/v2 v2.0.0
|
require github.com/tikv/client-go/v2 v2.0.0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
module unsafedestoryrange
|
module unsafedestoryrange
|
||||||
|
|
||||||
go 1.15
|
go 1.16
|
||||||
|
|
||||||
require github.com/tikv/client-go/v2 v2.0.0
|
require github.com/tikv/client-go/v2 v2.0.0
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue