We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Let me know if i'm wrong :
func getTags(obj reflect.Type, tags map[string]string, key string) { if obj.Kind() != reflect.Struct && obj.Kind() != reflect.Ptr { return } var tag string fieldsCount := obj.NumField() for i := 0; i < fieldsCount; i++ { structField := obj.Field(i) if structField.Anonymous && structField.Type.Kind() == reflect.Struct { getTags(obj, tags, key) } else { tag = structField.Tag.Get(key) if tag != "" { tags[structField.Name] = tag } } } }
So if it's another struct, it will call itself with the same tag (obj)
Result in a infinite loop (overflow)
Possible solution: replaced with structField.Type
getTags(structField.Type, tags, key)
=== Step to reproduce ===
In a model
type Model struct { aranGO.Document } type Event struct { Model Title string `json:"title"` }
The embedded struct should cause the SO
The text was updated successfully, but these errors were encountered:
hi @malletjo , thanks for the report. I will check this now
Sorry, something went wrong.
No branches or pull requests
Let me know if i'm wrong :
So if it's another struct, it will call itself with the same tag (obj)
Result in a infinite loop (overflow)
Possible solution: replaced with structField.Type
=== Step to reproduce ===
In a model
The embedded struct should cause the SO
The text was updated successfully, but these errors were encountered: