title: tls.Dial returns "too many colons in address"
body: <p>I am trying to loop through an array of addresses, and check their tls cert status. I pieced together a program from various examples that do other things.</p>
  
  <p>My first step in processing is </p>
  
  <pre><code>conn, err := tls.Dial("tcp", url, nil)
  </code></pre>
  
  <p>where 'url' is passed in from the array (I do import <code>crypto/tls</code>). Before I go on to pulling the cert, I check for errors:</p>
  
  <pre><code>if err != nil { 
      log.Printf("Unable to get %q - %s\n", url, err)
      return
  }
  </code></pre>
  
  <p>Here is a snippet of the array (with only test addresses for now):</p>
  
  <pre><code>var urls = []string{
      "https://google.com:443",
      "https://expired.badssl.com:443",
      "[https://wrong.host.badssl.com]:443",
      "[https://self-signed.badssl.com]:443"
  }
  </code></pre>
  
  <p>The first 2 return <code>too many colons in address</code>
  I found a suggestion to fix that using the brackets. The next 2 addresses, with the brackets, return <code>no such host</code></p>
  
  <p>Where is my error?</p>