If the logic is the same, wrap the field in an accessor method and use an
interface.
> On Nov 9, 2020, at 9:11 PM, Brandon Busby
> wrote:
>
> I have structs with duplicate fields and duplicate code to go along with
> them. The problem is that the duplicate code does make use of non-common
I have structs with duplicate fields and duplicate code to go along with
them. The problem is that the duplicate code does make use of non-common
fields. Here is an example of the code.
https://play.golang.org/p/IkoNJTdoVLD
I could extract the duplicate code sections into a method, eliminatin