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
Post a Comment