Golang net.LookupCNAME() function example
package net
Golang net.LookupCNAME() function usage example
For example, in socketloop.com's domain configuration, a CNAME was configure for receiving email
host : zb14031726
type : CNAME
content : zmverify.zoho.com.
and
package main
import (
"fmt"
"net"
)
func main() {
DOMAINcname, err := net.LookupCNAME("zb14031726.socketloop.com")
fmt.Println(DOMAINcname, err)
}
will translate the CNAME to equivalent hostname
business.zoho.com.
Reference :
Advertisement
Something interesting
Tutorials
+11.6k Android Studio : Create custom icons for your application example
+19k Golang : Padding data for encryption and un-padding data for decryption
+18.5k Golang : Set, Get and List environment variables
+23.5k Golang : Check if element exist in map
+12.1k Golang : Pagination with go-paginator configuration example
+6.1k Golang : Debug with Godebug
+7.4k Golang : Word limiter example
+7.9k Golang Hello World Example
+28.6k Golang : Read, Write(Create) and Delete Cookie example
+12.3k Golang : How to display image file or expose CSS, JS files from localhost?
+11.1k Golang : Fix go.exe is not compatible with the version of Windows you're running