How to set timeout while doing a net.DialTCP in golang?

As net.DialTCP seems like the only way to get net.TCPConn, I'm not sure how to set timeouts while doing the DialTCP. https://golang.org/pkg/net/#DialTCP func connectAddress(addr *net.TCPAddr, wg *...