windows - Can I use Golang to get the internal domain name of an Active Directory environment? -


i want use golang fqdn of internal windows domain on. if name corp.com, example, want small script in golang find me.

is possible?

there's no built-in way using go's stdlib, however, might able looking short hostname dns (to ip known dns), doing reverse lookup of ip dns (which should give machine's fqdn), end of (minus short hostname) should ad domain. of logic implemented in go-fqdn.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -