I'm currently writing a REST API client, and I'm trying to determine what OS the user is using in order to generate a useful User Agent string. This is going to allow me to (hopefully) make good decisions about what OS's I should bother supporting in the future.
What I'd like to do is this: generate a string that looks something like:
Linux/1.3.2 OR Darwin/1.3.2 OR Windows/1.3.2
It should work across Linux / Mac / Windows.
Currently, I'm able to retrieve the OS type (eg: 'linux' / 'windows' / 'darwin') using
runtime.GOOS
But I'm unable to find a way to grab the OS major/minor/micro versions.