code: func searchForLib(paths string) (firstFound string, err error) {
  
  	libPaths := strings.Split(paths, ",")
  	for _, path := range libPaths {
  		if _, err = os.Stat(strings.TrimSpace(path)); !os.IsNotExist(err) {
  			firstFound = strings.TrimSpace(path)
  			break
  		}
  	}
  
  	if firstFound == "" {
  		err = fmt.Errorf("no suitable paths for pkcs11 library found: %s", paths)
  	}
  
  	return
  }
docs: // return the first path that is found