I'm currently using a method where I have a "base" file that defines the types, interfaces and a basic API for the package. I then create an _windows.go
and _linux.go
file and add platform specific types that I can apply the interface to. The setup is basically like this: http://play.golang.org/p/2DJxTuSAIh.
- Is this considered best practice?
- Would this assist in a team setting where some developers are linux focused and some windows focused, i.e. if the interface changes both teams will be notified via build failure?