GoLang MongoId::getHostname

request it (108)
GoLang replacement for PHP's MongoId::getHostname [edit | history]

Do you know a GoLang replacement for PHP's MongoId::getHostname? Write it!

PHP MongoId::getHostname

PHP original manual for MongoId::getHostname [ show | php.net ]


(PECL mongo >= 1.0.8)

MongoId::getHostnameGets the hostname being used for this machine's ids


public static string MongoId::getHostname ( void )

This returns the hostname MongoId is using to generate unique ids. This should be the same value gethostname() returns.

It is identical to the function:


public static function getHostname() {



This function has no parameters.

Return Values

Returns the hostname.