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
|
||||
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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module gcworker
|
||||
|
||||
go 1.15
|
||||
go 1.16
|
||||
|
||||
require github.com/tikv/client-go/v2 v2.0.0
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module rawkv
|
||||
|
||||
go 1.15
|
||||
go 1.16
|
||||
|
||||
require github.com/tikv/client-go/v2 v2.0.0
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module 1pc_txn
|
||||
|
||||
go 1.15
|
||||
go 1.16
|
||||
|
||||
require github.com/tikv/client-go/v2 v2.0.0
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module async_commit
|
||||
|
||||
go 1.15
|
||||
go 1.16
|
||||
|
||||
require github.com/tikv/client-go/v2 v2.0.0
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module delete_range
|
||||
|
||||
go 1.15
|
||||
go 1.16
|
||||
|
||||
require github.com/tikv/client-go/v2 v2.0.0
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module txnkv
|
||||
|
||||
go 1.15
|
||||
go 1.16
|
||||
|
||||
require github.com/tikv/client-go/v2 v2.0.0
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module pessimistic_txn
|
||||
|
||||
go 1.15
|
||||
go 1.16
|
||||
|
||||
require github.com/tikv/client-go/v2 v2.0.0
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module unsafedestoryrange
|
||||
|
||||
go 1.15
|
||||
go 1.16
|
||||
|
||||
require github.com/tikv/client-go/v2 v2.0.0
|
||||
|
||||
|
|
Loading…
Reference in New Issue