andersfylling / disgord

Go module for interacting with the documented Discord's bot interface; Gateway, REST requests and voice
BSD 3-Clause "New" or "Revised" License
502 stars 71 forks source link

[interfaces Coper & DeepCopier] Enforce sub structures to implement them #418

Open andersfylling opened 2 years ago

andersfylling commented 2 years ago

It's currently troublesome to specify Copier and DeepCopier for every substructure. Write a dependency tree to identify which structs needs the different interfaces instead of requiring var _ Copier = (*Message)(nil)

andersfylling commented 2 years ago

Maybe all exported types should automatically implement this.

switchupcb commented 1 year ago

Consider using Copygen for copier functionality without the use of reflection.