code: func New(ctx context.Context, cfg Config) (*GPG, error) {
  	// ensure created files don't have group or world perms set
  	// this setting should be inherited by sub-processes
  	umask(cfg.Umask)
  
  	// make sure GPG_TTY is set (if possible)
  	if gt := os.Getenv("GPG_TTY"); gt == "" {
  		if t := tty(); t != "" {
  			_ = os.Setenv("GPG_TTY", t)
  		}
  	}
  
  	g := &GPG{
  		binary: "gpg",
  		args:   append(defaultArgs, cfg.Args...),
  	}
  
  	cache, err := lru.New2Q(1024)
  	if err != nil {
  		return nil, err
  	}
  	g.listCache = cache
  
  	bin, err := Binary(ctx, cfg.Binary)
  	if err != nil {
  		return nil, err
  	}
  	g.binary = bin
  
  	return g, nil
  }
docs: // New creates a new GPG wrapper