I want to get the unique identifier of the current host that is used as the license name in golang. How to do that ? For example, like C:
gethostid() //can get the host id
I want to get the unique identifier of the current host that is used as the license name in golang. How to do that ? For example, like C:
gethostid() //can get the host id
gethostid(3) is a UNIX/BSD specific libc function. reading from /etc/hostid would not work on non UNIX systems and is not platform independent.
since go does not provide something like gethostid() why not implement it like other platform independent languages like JAVA do, answered here: How to get a unique computer identifier in Java (like disk id or motherboard id)