Skip to content

Commit 4157755

Browse files
authored
fix: Revert faker pointer change (#2093)
#### Summary Reverts https://github.com/cloudquery/plugin-sdk/pull/2087/files#diff-d23bd4e64abe4e710bc1f39711bda2ddc0d4a9a5c1ee80e7551787a0f81e2d5aL20 as it broke some plugins tests. Underlying issue is that we call `getFakedValue` on the array of fields in https://github.com/cloudquery/plugin-sdk/blob/1298b36185f8d19e0a0c65f6f3958106565271c9/faker/faker.go#L65 so when operating on the pointer we share the max depth with the fields. Reverting for now so it doesn't block the SDK update ---
1 parent 1298b36 commit 4157755

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: faker/faker.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ type faker struct {
1818

1919
var errEFaceNotAllowed = errors.New("any not allowed")
2020

21-
func (f *faker) getFakedValue(a any) (reflect.Value, error) {
21+
func (f faker) getFakedValue(a any) (reflect.Value, error) {
2222
t := reflect.TypeOf(a)
2323
if t == nil {
2424
return reflect.Value{}, errEFaceNotAllowed
2525
}
26+
//nolint:revive
2627
f.maxDepth--
2728
if f.maxDepth < 0 {
2829
return reflect.Value{}, errors.New("max_depth reached")

0 commit comments

Comments
 (0)