'golang get hardware info (uuid/hwid) [duplicate]

I am trying get a unique hardware info such as the uuid of a device for a client based application that will have an authentication process.

In python it would be something like:

import subprocess

hwid = str(subprocess.check_output('wmic csproduct get uuid')).split('\\r\\n')[1].strip('\\r').strip()

print(hwid)

Ouput:

9F23624C-33F1-3244-A2ZD-ABF6CC8E5FB5

How do can I replicate this function in go, and assign it to a variable ? uuid := xxx



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source