My apologies if this is not the right place for this kind of questions.
Coming from a java background I’m uncertain what the best way would be to call different functions on the basis of the struct given as an argument to it. In Java, I would create several methods and the right one would get executed because of the method overloading, what would be the best way to solve this in Go taking in account new structs will be added later on with the need for new functions accordingly?
If possible, you should change the argument into a method receiver. This should work as long as there aren’t two different objects involved that can both vary in type (and all the types involved are ones that were defined in packages that you control).