From a54d0ff05f0c43e5ff971dc6983cfbca42e9299a Mon Sep 17 00:00:00 2001 From: Brandon Roberson Date: Mon, 8 Aug 2022 17:21:06 +0000 Subject: [PATCH 1/3] Update go to 1.18 + go mod tidy + go mod vendor --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 1451a48b..0ed271af 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module code.cloudfoundry.org/cf-networking-helpers -go 1.17 +go 1.18 replace code.cloudfoundry.org/lager => code.cloudfoundry.org/lager v1.1.1-0.20210513163233-569157d2803b From fbcab4ed4cfa3c1993ab07bea62a7282efb4f0b9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Aug 2022 17:00:49 +0000 Subject: [PATCH 2/3] Bump github.com/jmoiron/sqlx from 1.3.4 to 1.3.5 Bumps [github.com/jmoiron/sqlx](https://github.com/jmoiron/sqlx) from 1.3.4 to 1.3.5. - [Release notes](https://github.com/jmoiron/sqlx/releases) - [Commits](https://github.com/jmoiron/sqlx/compare/v1.3.4...v1.3.5) --- updated-dependencies: - dependency-name: github.com/jmoiron/sqlx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 5 ++--- vendor/github.com/jmoiron/sqlx/sqlx.go | 8 +++++--- vendor/modules.txt | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 0ed271af..f1d86cd8 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/cloudfoundry/sonde-go v0.0.0-20171206171820-b33733203bb4 github.com/go-sql-driver/mysql v1.6.0 github.com/gogo/protobuf v1.3.2 - github.com/jmoiron/sqlx v1.3.4 + github.com/jmoiron/sqlx v1.3.5 github.com/lib/pq v1.10.3 github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d github.com/onsi/ginkgo v1.16.5 diff --git a/go.sum b/go.sum index 13f5db38..6c87306e 100644 --- a/go.sum +++ b/go.sum @@ -15,7 +15,6 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= @@ -38,8 +37,8 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/howeyc/gopass v0.0.0-20170109162249-bf9dde6d0d2c/go.mod h1:lADxMC39cJJqL93Duh1xhAs4I2Zs8mKS89XWXFGp9cs= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/jmoiron/sqlx v1.3.4 h1:wv+0IJZfL5z0uZoUjlpKgHkgaFSYD+r9CfrXjEXsO7w= -github.com/jmoiron/sqlx v1.3.4/go.mod h1:2BljVx/86SuTyjE+aPYlHCTNvZrnJXghYGpNiXLBMCQ= +github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= +github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= diff --git a/vendor/github.com/jmoiron/sqlx/sqlx.go b/vendor/github.com/jmoiron/sqlx/sqlx.go index 112ef70e..f7b28768 100644 --- a/vendor/github.com/jmoiron/sqlx/sqlx.go +++ b/vendor/github.com/jmoiron/sqlx/sqlx.go @@ -878,9 +878,10 @@ func structOnlyError(t reflect.Type) error { } // scanAll scans all rows into a destination, which must be a slice of any -// type. If the destination slice type is a Struct, then StructScan will be -// used on each row. If the destination is some other kind of base type, then -// each row must only have one column which can scan into that type. This +// type. It resets the slice length to zero before appending each element to +// the slice. If the destination slice type is a Struct, then StructScan will +// be used on each row. If the destination is some other kind of base type, +// then each row must only have one column which can scan into that type. This // allows you to do something like: // // rows, _ := db.Query("select id from people;") @@ -910,6 +911,7 @@ func scanAll(rows rowsi, dest interface{}, structOnly bool) error { if err != nil { return err } + direct.SetLen(0) isPtr := slice.Elem().Kind() == reflect.Ptr base := reflectx.Deref(slice.Elem()) diff --git a/vendor/modules.txt b/vendor/modules.txt index c20ad99d..cafbe927 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -31,7 +31,7 @@ github.com/go-task/slim-sprig github.com/gogo/protobuf/gogoproto github.com/gogo/protobuf/proto github.com/gogo/protobuf/protoc-gen-gogo/descriptor -# github.com/jmoiron/sqlx v1.3.4 +# github.com/jmoiron/sqlx v1.3.5 ## explicit; go 1.10 github.com/jmoiron/sqlx github.com/jmoiron/sqlx/reflectx From f7b0a1d598e2e697ba94c1465db64174484abd5d Mon Sep 17 00:00:00 2001 From: Amin Jamali Date: Thu, 11 Jan 2024 15:36:09 +0000 Subject: [PATCH 3/3] Run github workflow on PR requests --- .github/workflows/go-with-mysql-postgres-db.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/go-with-mysql-postgres-db.yml b/.github/workflows/go-with-mysql-postgres-db.yml index 2d4fbd0d..41ac46c6 100644 --- a/.github/workflows/go-with-mysql-postgres-db.yml +++ b/.github/workflows/go-with-mysql-postgres-db.yml @@ -3,6 +3,10 @@ name: Go on: push: branches: [ develop ] + pull_request: + branches: + - develop + - main jobs: test: