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
Hi! I was researching the source code of this project and noticed that almost all the configuration is done with protobuf. I'm wondering why protobuf was chosen for this purpose and why don't just use simple Golang structures for configs? Are there some specific advantages for this solution, like easier to implement different configuration file formats support, easier to keep compatibility between versions, or is it making easier documenting configuration of the app?
UPD: Such solution has IMO major issue for code flexibility: you cannot give functions and different interfaces as a parameter without using any and then de referencing it. It makes harder to use patterns like dependency injection what is really bad. But at the same time it's way too time consuming to rewrite everything on simple golang structs without protobuf
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I was researching the source code of this project and noticed that almost all the configuration is done with protobuf. I'm wondering why protobuf was chosen for this purpose and why don't just use simple Golang structures for configs? Are there some specific advantages for this solution, like easier to implement different configuration file formats support, easier to keep compatibility between versions, or is it making easier documenting configuration of the app?
UPD: Such solution has IMO major issue for code flexibility: you cannot give functions and different interfaces as a parameter without using any and then de referencing it. It makes harder to use patterns like dependency injection what is really bad. But at the same time it's way too time consuming to rewrite everything on simple golang structs without protobuf
Beta Was this translation helpful? Give feedback.
All reactions