You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New Add/Remove prefix option (fatih#69)
* New Add/Remove prefix option
Some libraries like [the gorm ORM](https://github.com/go-gorm/gorm) or
the [gaum SQL query builder](https://github.com/shiftleftsecurity/gaum)
use a prefix in the tag name (ie `gorm:"column:struct_field"`,
gaum:"field_name=struct_field") to help ther Scanner/Valuer interact
with the sql library in go.
This PR adds the ability to add and remove said prefixes.
I used these two libraries as samples in the tests files to help
understand the rationale behind said feature to people reading without
context, hopefully this doesn't break any project convention.
* Add Readme section for prefix
* Replaced prefix with format
* Update main.go
Accepting fatih's suggestion on flag doc
Co-authored-by: Fatih Arslan <[email protected]>
* Update README.md
Accepting fatih's suggestion on `format` flag
Co-authored-by: Fatih Arslan <[email protected]>
* Update README.md
Accepting fatih's suggestion on readme secion title
Co-authored-by: Fatih Arslan <[email protected]>
* Rename formatting var to valueFormat
* Rename $value to $field for clarity
* Update readme too
Co-authored-by: Fatih Arslan <[email protected]>