"error initializing client: connecting to desktop app: read: connection reset"
I am trying to execute the op command from a Golang app like so:
```
package main
import (
"encoding/json"
"log"
"os/exec"
)
func main() {
op := exec.Command("op", "item", "get", "DocSend", "--format=json")
//op := exec.Command("env")
out, err := op.Output()
if e, ok := err.(*exec.ExitError); ok {
log.Fatal(e, ": ", string(e.Stderr))
}
var item map[string]interface{}
if err := json.Unmarshal(out, &item); err != nil {
log.Fatal(err)
}
println(item["fields"])
}
```
However, I keep getting the following error:
2023/04/13 10:40:45 exit status 1: [ERROR] 2023/04/13 10:40:45 error initializing client: connecting to desktop app: read: connection reset, make sure the CLI is correctly installed and Connect with 1Password CLI is enabled in the 1Password app
When I perform the exact same thing but from a Python script like so:
```
!/usr/bin/env python
import json
import subprocess
op = subprocess.run(["op", "item", "get", "DocSend", "--format=json"], capture_output=True)
item = json.loads(op.stdout)
print(item["fields"])
```
...there is no issue, and it happily prints out the item fields:
[{'id': 'username', 'type': 'STRING', 'purpose': 'USERNAME', 'label': 'username', 'value': ... }, ...]
Why can I not call op from a golang app but I can from a python one?
1PasswordCLI version 2.16.1
1Password version 8.10.4
OS: Fedora 37
Go 1.20.2
Python 3.10.9
1Password Version: 8.10.4
Extension Version: Not Provided
OS Version: Fedora 37
Browser:_ Not Provided
