I am very new in Go and I was exploring go to use for one of my micro services. I was wonder the way Go converts objects to Json and back to Json. But unfortunately i found configuring the output field names are little difficult with the use of tag names.
type MyStruct strust{
MyName string
}
will converts to json
{
"MyName" : "somestring"
}
But we are following a naming strategy for the whole api across Organization to follow snake_case
{
"my_name" : "somestring"
}
Is considered to be valid in my org.
I started using the tags like json:"my_name,omitempty"
etc per field level.
I would like to know is there a way i can configure it at global project level, so that i dont want to take care this at every object and its field level.