mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
rebase: bump github.com/onsi/gomega from 1.18.0 to 1.18.1
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.18.0 to 1.18.1. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.18.0...v1.18.1) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
mergify[bot]
parent
d1d4d92131
commit
266e5b3b80
7
vendor/github.com/onsi/gomega/matchers/have_field.go
generated
vendored
7
vendor/github.com/onsi/gomega/matchers/have_field.go
generated
vendored
@ -12,6 +12,13 @@ func extractField(actual interface{}, field string) (interface{}, error) {
|
||||
fields := strings.SplitN(field, ".", 2)
|
||||
actualValue := reflect.ValueOf(actual)
|
||||
|
||||
if actualValue.Kind() == reflect.Ptr {
|
||||
actualValue = actualValue.Elem()
|
||||
}
|
||||
if actualValue == (reflect.Value{}) {
|
||||
return nil, fmt.Errorf("HaveField encountered nil while dereferencing a pointer of type %T.", actual)
|
||||
}
|
||||
|
||||
if actualValue.Kind() != reflect.Struct {
|
||||
return nil, fmt.Errorf("HaveField encountered:\n%s\nWhich is not a struct.", format.Object(actual, 1))
|
||||
}
|
||||
|
Reference in New Issue
Block a user