code: func (g *GPG) listKeys(ctx context.Context, typ string, search ...string) (gpg.KeyList, error) {
  	args := []string{"--with-colons", "--with-fingerprint", "--fixed-list-mode", "--list-" + typ + "-keys"}
  	args = append(args, search...)
  	if e, found := g.listCache.Get(strings.Join(args, ",")); found {
  		if ev, ok := e.(gpg.KeyList); ok {
  			return ev, nil
  		}
  	}
  	cmd := exec.CommandContext(ctx, g.binary, args...)
  	cmd.Stderr = nil
  
  	out.Debug(ctx, "gpg.listKeys: %s %+v\n", cmd.Path, cmd.Args)
  	cmdout, err := cmd.Output()
  	if err != nil {
  		if bytes.Contains(cmdout, []byte("secret key not available")) {
  			return gpg.KeyList{}, nil
  		}
  		return gpg.KeyList{}, err
  	}
  
  	kl := parseColons(bytes.NewBuffer(cmdout))
  	g.listCache.Add(strings.Join(args, ","), kl)
  	return kl, nil
  }
docs: // listKey lists all keys of the given type and matching the search strings