This PR removes the usued fieldToTag map from the info struct and adds in an ordered list of tags: tags. This change is made to reflect how the info struct was used in the Prepare stage and makes the code slightly more efficient.
It fixed the bug where a panic would occur if an unexported field has a db tag. It now throws an error.
It stopstypeInfo from unnecessarley reflecting the value when only the type is used.
It changes the names structType and fieldType to typ as this is the more idiomatic way of doing things in Go (the struct they are fields of tells us what they are the type of).
This PR removes the usued
fieldToTag
map from theinfo
struct and adds in an ordered list of tags:tags
. This change is made to reflect how theinfo
struct was used in thePrepare
stage and makes the code slightly more efficient.It fixed the bug where a panic would occur if an unexported field has a db tag. It now throws an error.
It stops
typeInfo
from unnecessarley reflecting the value when only the type is used.It changes the names
structType
andfieldType
totyp
as this is the more idiomatic way of doing things in Go (the struct they are fields of tells us what they are the type of).