Skip to content

Commit eb6560f

Browse files
docs: show StdioConnection.Args for Go --log-dir snippet
The Go SDK now supports extra runtime args via StdioConnection.Args / TcpConnection.Args. Replace the outdated 'Go cannot pass args, run the CLI manually' snippet with the actual idiomatic call. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ee98706 commit eb6560f

1 file changed

Lines changed: 13 additions & 6 deletions

File tree

docs/troubleshooting/debugging.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,18 +142,25 @@ const client = new CopilotClient({
142142
```go
143143
package main
144144

145+
import copilot "github.com/github/copilot-sdk/go"
146+
145147
func main() {
146-
// The Go SDK does not currently support passing extra CLI arguments.
147-
// For custom log directories, run the CLI manually with --log-dir
148-
// and connect via Connection (UriConnection).
148+
client := copilot.NewClient(&copilot.ClientOptions{
149+
Connection: copilot.StdioConnection{
150+
Args: []string{"--log-dir", "/path/to/logs"},
151+
},
152+
})
153+
_ = client
149154
}
150155
```
151156
<!-- /docs-validate: hidden -->
152157

153158
```go
154-
// The Go SDK does not currently support passing extra CLI arguments.
155-
// For custom log directories, run the CLI manually with --log-dir
156-
// and connect via Connection (UriConnection).
159+
client := copilot.NewClient(&copilot.ClientOptions{
160+
Connection: copilot.StdioConnection{
161+
Args: []string{"--log-dir", "/path/to/logs"},
162+
},
163+
})
157164
```
158165

159166
</details>

0 commit comments

Comments
 (0)