On of the advantages of using Go is it’s cross-platform support, the ability to write the once and have it work across many operating systems. However, there are times when you’ll need to change the route through your based which OS is it. If you’re needing to do this on a large scale there are better, more manageable ways, but for tiny changes this works fine.
This snippet uses the GOOS flag within the package, which is also used at compile time.



Source link

LEAVE A REPLY

Please enter your comment!
Please enter your name here