code: func (c *CheckTCP) check() {
  	conn, err := c.dialer.Dial(`tcp`, c.TCP)
  	if err != nil {
  		c.Logger.Printf("[WARN] agent: Check %q socket connection failed: %s", c.CheckID, err)
  		c.Notify.UpdateCheck(c.CheckID, api.HealthCritical, err.Error())
  		return
  	}
  	conn.Close()
  	c.Logger.Printf("[DEBUG] agent: Check %q is passing", c.CheckID)
  	c.Notify.UpdateCheck(c.CheckID, api.HealthPassing, fmt.Sprintf("TCP connect %s: Success", c.TCP))
  }
docs: // check is invoked periodically to perform the TCP check