code: func FindAvailablePort() (*net.TCPAddr, error) {
  	l, err := net.Listen("tcp", ":0")
  	if err == nil {
  		defer l.Close()
  		addr := l.Addr()
  		if a, ok := addr.(*net.TCPAddr); ok {
  			return a, nil
  		}
  		return nil, fmt.Errorf("unable to obtain a valid tcp port: %v", addr)
  	}
  	return nil, err
  }
docs: // FindAvailablePort returns an available and valid TCP port.