Skip to content

Commit

Permalink
- Update go.mod min version to Go 1.18. Fixes #139. (#140)
Browse files Browse the repository at this point in the history
* - Update go.mod min version to Go 1.18. Fixes #139.
- Update actions to test only supported Go versions (1.19, 1.20)
- Updated dependencies (ie, Google Cloud, Azure, AWS sdks)

* update actions

* fix tests that are mac os specific

* fix lint issues

* update lint config

* quote 1.20 in gh action workflows
  • Loading branch information
funkyshu authored May 13, 2023
1 parent 9c9f562 commit 073899a
Show file tree
Hide file tree
Showing 12 changed files with 178 additions and 117 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: '1.19'
go-version: '1.20'

- name: Checkout code
uses: actions/checkout@v3
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ on:
jobs:
test:
strategy:
fail-fast: false
matrix:
go-version: [1.18, 1.19]
go-version: [1.19, '1.20']
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Checkout code
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: '1.20'
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/whitesource.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: '1.20'

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ linters-settings:

unused:
# Select the Go version to target. The default is '1.13'.
go: "1.18"
go: "1.19"

# whitespace:
# multi-if: false # Enforces newlines (or comments) after every multi-line if statement
Expand Down
2 changes: 1 addition & 1 deletion .gvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
go1.19.2
go1.20.4
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]

## [6.7.0] - 2023-05-13

### Security
- Update go.mod min version to Go 1.18. Fixes #139.
- Update actions to test only supported Go versions (1.19, 1.20)
- Updated dependencies (ie, Google Cloud, Azure, AWS sdks)

## [6.6.0] - 2022-10-25
### Fixed
- fixed #129(cdd4143) Resolve failing golangci-lint - elliotwutingfeng
Expand Down
4 changes: 1 addition & 3 deletions backend/mem/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ func (f *File) Close() error {
f.memFile.Lock()
if f.memFile.writeBuffer.Len() > 0 {
bufferContents := f.memFile.writeBuffer.Bytes()
for i := range bufferContents {
f.memFile.contents = append(f.memFile.contents, bufferContents[i])
}
f.memFile.contents = append(f.memFile.contents, bufferContents...)
f.memFile.lastModified = time.Now()
f.memFile.writeBuffer = new(bytes.Buffer)
}
Expand Down
5 changes: 1 addition & 4 deletions backend/sftp/fileSystem_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package sftp
import (
"io"
"os"
"regexp"
"testing"
"time"

Expand Down Expand Up @@ -128,9 +127,7 @@ func (ts *fileSystemTestSuite) TestClient() {
// no opts, no authority
ts.sftpfs.options = nil
_, err = ts.sftpfs.Client(utils.Authority{Host: "badhost"})
if ts.Error(err, "error found") {
ts.Regexp(regexp.MustCompile("(?:no such host|Temporary failure in name resolution)"), err.Error(), "no such host", "error matches")
}
ts.Error(err, "error found")

}

Expand Down
4 changes: 1 addition & 3 deletions backend/sftp/options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ func (o *optionsSuite) TestGetClient() {
KnownHostsCallback: ssh.InsecureIgnoreHostKey(),
},
hasError: true,
errRegex: "(?:no such host|Temporary failure in name resolution)",
errRegex: ".*",
message: "getclient - bad host",
},
{
Expand Down Expand Up @@ -558,9 +558,7 @@ func generatePrivateKey(passphrase []byte) ([]byte, error) {
}

if len(passphrase) > 0 {
//nolint:staticcheck // SA1019
pemBlock, err = x509.EncryptPEMBlock(rand.Reader, pemBlock.Type, pemBlock.Bytes, passphrase, x509.PEMCipherAES256)
// uselint
if err != nil {
return nil, err
}
Expand Down
62 changes: 32 additions & 30 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,64 +1,66 @@
module github.com/c2fo/vfs/v6

go 1.18
go 1.19

require (
cloud.google.com/go/storage v1.27.0
cloud.google.com/go/storage v1.30.1
github.com/Azure/azure-pipeline-go v0.2.3
github.com/Azure/azure-storage-blob-go v0.15.0
github.com/Azure/go-autorest/autorest v0.11.28
github.com/Azure/go-autorest/autorest/adal v0.9.21
github.com/aws/aws-sdk-go v1.44.122
github.com/fatih/color v1.13.0
github.com/fsouza/fake-gcs-server v1.40.2
github.com/Azure/go-autorest/autorest v0.11.29
github.com/Azure/go-autorest/autorest/adal v0.9.23
github.com/aws/aws-sdk-go v1.44.262
github.com/fatih/color v1.15.0
github.com/fsouza/fake-gcs-server v1.45.1
github.com/mitchellh/go-homedir v1.1.0
github.com/pkg/errors v0.9.1
github.com/pkg/sftp v1.13.5
github.com/stretchr/testify v1.8.1
golang.org/x/crypto v0.1.0
golang.org/x/net v0.1.0
google.golang.org/api v0.100.0
github.com/stretchr/testify v1.8.2
golang.org/x/crypto v0.9.0
golang.org/x/net v0.10.0
google.golang.org/api v0.122.0
)

require (
cloud.google.com/go v0.104.0 // indirect
cloud.google.com/go/compute v1.10.0 // indirect
cloud.google.com/go/iam v0.5.0 // indirect
cloud.google.com/go/pubsub v1.26.0 // indirect
cloud.google.com/go v0.110.2 // indirect
cloud.google.com/go/compute v1.19.2 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v1.0.1 // indirect
cloud.google.com/go/pubsub v1.30.1 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/alexbrainman/goissue34681 v0.0.0-20191006012335-3fc7a47baff5 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/felixge/httpsnoop v1.0.3 // indirect
github.com/golang-jwt/jwt/v4 v4.4.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/renameio/v2 v2.0.0 // indirect
github.com/google/s2a-go v0.1.3 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect
github.com/googleapis/gax-go/v2 v2.6.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
github.com/googleapis/gax-go/v2 v2.8.0 // indirect
github.com/gorilla/handlers v1.5.1 // indirect
github.com/gorilla/mux v1.8.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/kr/fs v0.1.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-ieproxy v0.0.9 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mattn/go-ieproxy v0.0.10 // indirect
github.com/mattn/go-isatty v0.0.18 // indirect
github.com/pkg/xattr v0.4.9 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
go.opencensus.io v0.23.0 // indirect
golang.org/x/oauth2 v0.1.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.1.0 // indirect
golang.org/x/text v0.4.0 // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/sync v0.2.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e // indirect
google.golang.org/grpc v1.50.1 // indirect
google.golang.org/protobuf v1.28.1 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
google.golang.org/grpc v1.55.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 073899a

Please sign in to comment.