First of all thank you for building this package, I have just started using it and finding it fantastic.
What I think would be very useful and easy to implement, is to just accept tags without value, just like how encoding/json does, like this:
json:""
The above makes use of the struct field name, avoiding having to duplicate the same field name when we do not want to change it.
You can call reflect.StructTag.Lookup instead of reflect.StructTag.Get. When Lookup returns true for its second value, we are processing the tag value be it empty or not. If empty, overwrite it with reflect.StructField.Name, otherwise do as it has been done before.
First of all thank you for building this package, I have just started using it and finding it fantastic.
What I think would be very useful and easy to implement, is to just accept tags without value, just like how encoding/json does, like this:
json:""
The above makes use of the struct field name, avoiding having to duplicate the same field name when we do not want to change it. You can call reflect.StructTag.Lookup instead of reflect.StructTag.Get. When Lookup returns true for its second value, we are processing the tag value be it empty or not. If empty, overwrite it with reflect.StructField.Name, otherwise do as it has been done before.