code: func newUDPWriter(addr string) (*udpWriter, error) {
  	if addr == "" {
  		addr = addressFromEnvironment()
  	}
  	if addr == "" {
  		return nil, errors.New("No address passed and autodetection from environment failed")
  	}
  
  	udpAddr, err := net.ResolveUDPAddr("udp", addr)
  	if err != nil {
  		return nil, err
  	}
  	conn, err := net.DialUDP("udp", nil, udpAddr)
  	if err != nil {
  		return nil, err
  	}
  	writer := &udpWriter{conn: conn}
  	return writer, nil
  }
docs: // New returns a pointer to a new udpWriter given an addr in the format "hostname:port".