code: func infinibandPorts(infinibandPath, device string) ([]string, error) {
  	ports, err := filepath.Glob(filepath.Join(infinibandPath, device, "ports/*"))
  	if err != nil {
  		return nil, err
  	}
  
  	if len(ports) < 1 {
  		log.Debugf("Unable to detect ports for %s", device)
  		err = errInfinibandNoPortsFound
  		return nil, err
  	}
  
  	// Extract just the filenames which equates to the port numbers.
  	for i, port := range ports {
  		ports[i] = filepath.Base(port)
  	}
  
  	return ports, nil
  }
docs: // Retrieve a list of ports for the InfiniBand device.