Skip to content

Commit

Permalink
chore(deps): Bump github.com/vektra/mockery/v2 from 2.46.0 to 2.46.3 (#…
Browse files Browse the repository at this point in the history
…36)

* chore(deps): Bump github.com/vektra/mockery/v2 from 2.46.0 to 2.46.3

Bumps [github.com/vektra/mockery/v2](https://github.com/vektra/mockery) from 2.46.0 to 2.46.3.
- [Release notes](https://github.com/vektra/mockery/releases)
- [Changelog](https://github.com/vektra/mockery/blob/master/docs/changelog.md)
- [Commits](vektra/mockery@v2.46.0...v2.46.3)

---
updated-dependencies:
- dependency-name: github.com/vektra/mockery/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* gen

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jacob Brewer <[email protected]>
  • Loading branch information
dependabot[bot] and Jacobbrewer1 authored Oct 30, 2024
1 parent 960f940 commit 1ad2747
Show file tree
Hide file tree
Showing 13 changed files with 63 additions and 47 deletions.
6 changes: 4 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
module github.com/jacobbrewer1/patcher

go 1.22
go 1.23

toolchain go1.23.2

require (
github.com/gorilla/mux v1.8.1
github.com/stretchr/testify v1.9.0
github.com/vektra/mockery/v2 v2.46.0
github.com/vektra/mockery/v2 v2.46.3
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8=
github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0=
github.com/vektra/mockery/v2 v2.46.0 h1:DKIFj6hAPGwmOYiWfWzdsQtBgU8ozPXo3Bwbmf+Ku80=
github.com/vektra/mockery/v2 v2.46.0/go.mod h1:XNTE9RIu3deGAGQRVjP1VZxGpQNm0YedZx4oDs3prr8=
github.com/vektra/mockery/v2 v2.46.3 h1:Aia4iShZeNTy6CZJcvweK4X97XOzXcqb+k9jm8IqBS0=
github.com/vektra/mockery/v2 v2.46.3/go.mod h1:dDivqi0ShM8A29mLgZn13yZ14MdXlTM4V360u8JDWCQ=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
Expand Down
10 changes: 5 additions & 5 deletions mock_Joiner.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions mock_WhereTyper.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions mock_Wherer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,8 @@ func (s *SQLPatch) patchGen(resource any) {
}
}

// if no tag is set, use the field name
if tag == TagOptSkip {
continue
} else if tag == "" {
// If no tag is set, use the field name
if tag == "" {
tag = fType.Name
}

Expand Down Expand Up @@ -209,10 +207,13 @@ func NewDiffSQLPatch[T any](old, newT *T, opts ...PatchOpt) (*SQLPatch, error) {
return nil, ErrNoChanges
}

oldElem := reflect.ValueOf(old).Elem()
oldCopyElem := reflect.ValueOf(oldCopy).Elem()

// For each field in the old object, compare it against the copy and if the fields are the same, set them to zero or nil.
for i := 0; i < reflect.ValueOf(old).Elem().NumField(); i++ {
oldField := reflect.ValueOf(old).Elem().Field(i)
copyField := reflect.ValueOf(oldCopy).Elem().Field(i)
oldField := oldElem.Field(i)
copyField := oldCopyElem.Field(i)

if oldField.Kind() == reflect.Ptr && (oldField.IsNil() && copyField.IsNil() && !patch.includeZeroValues) {
continue
Expand All @@ -225,7 +226,7 @@ func NewDiffSQLPatch[T any](old, newT *T, opts ...PatchOpt) (*SQLPatch, error) {
if patch.ignoreFields == nil {
patch.ignoreFields = make([]string, 0)
}
patch.ignoreFields = append(patch.ignoreFields, strings.ToLower(reflect.ValueOf(old).Elem().Type().Field(i).Name))
patch.ignoreFields = append(patch.ignoreFields, strings.ToLower(oldElem.Type().Field(i).Name))
continue
}
}
Expand Down
2 changes: 1 addition & 1 deletion vendor/github.com/vektra/mockery/v2/.golangci.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/vektra/mockery/v2/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/vektra/mockery/v2/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions vendor/github.com/vektra/mockery/v2/pkg/config/config.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 25 additions & 12 deletions vendor/github.com/vektra/mockery/v2/pkg/generator.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/vektra/mockery/v2/pkg/logging/logging.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ github.com/stretchr/testify/suite
# github.com/subosito/gotenv v1.4.2
## explicit; go 1.18
github.com/subosito/gotenv
# github.com/vektra/mockery/v2 v2.46.0
## explicit; go 1.22
# github.com/vektra/mockery/v2 v2.46.3
## explicit; go 1.23
github.com/vektra/mockery/v2
github.com/vektra/mockery/v2/cmd
github.com/vektra/mockery/v2/pkg
Expand Down

0 comments on commit 1ad2747

Please sign in to comment.