Skip to content

Commit f86b5bc

Browse files
committed
Update docs for Go initialism casing
1 parent a3c03a6 commit f86b5bc

4 files changed

Lines changed: 19 additions & 19 deletions

File tree

docs/auth/byok.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func main() {
115115
Provider: &copilot.ProviderConfig{
116116
Type: "openai",
117117
BaseURL: "https://your-resource.openai.azure.com/openai/v1/",
118-
WireApi: "responses", // Use "completions" for older models
118+
WireAPI: "responses", // Use "completions" for older models
119119
APIKey: os.Getenv("FOUNDRY_API_KEY"),
120120
},
121121
})

docs/getting-started.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2000,9 +2000,9 @@ import (
20002000
func main() {
20012001
ctx := context.Background()
20022002

2003-
client := copilot.NewClient(&copilot.ClientOptions{
2004-
Connection: copilot.UriConnection{URL: "localhost:4321"},
2005-
})
2003+
client := copilot.NewClient(&copilot.ClientOptions{
2004+
Connection: copilot.URIConnection{URL: "localhost:4321"},
2005+
})
20062006

20072007
if err := client.Start(ctx); err != nil {
20082008
log.Fatal(err)
@@ -2021,7 +2021,7 @@ func main() {
20212021
import copilot "github.com/github/copilot-sdk/go"
20222022

20232023
client := copilot.NewClient(&copilot.ClientOptions{
2024-
Connection: copilot.UriConnection{URL: "localhost:4321"},
2024+
Connection: copilot.URIConnection{URL: "localhost:4321"},
20252025
})
20262026

20272027
if err := client.Start(ctx); err != nil {
@@ -2105,7 +2105,7 @@ var session = client.createSession(
21052105

21062106
</details>
21072107

2108-
**Note:** When `cli_url` / `cliUrl` / Go's `UriConnection` is provided, or Rust uses `Transport::External`, the SDK will not spawn or manage a CLI process - it will only connect to the existing server at the specified URL.
2108+
**Note:** When `cli_url` / `cliUrl` / Go's `URIConnection` is provided, or Rust uses `Transport::External`, the SDK will not spawn or manage a CLI process - it will only connect to the existing server at the specified URL.
21092109

21102110
## Telemetry and observability
21112111

docs/setup/backend-services.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Run the Copilot SDK in server-side applications—APIs, web backends, microservi
66

77
## How it works
88

9-
Instead of the SDK spawning a CLI child process, you run the CLI independently in **headless server mode**. Your backend connects to it over TCP using the `Connection` option (`UriConnection`).
9+
Instead of the SDK spawning a CLI child process, you run the CLI independently in **headless server mode**. Your backend connects to it over TCP using the `Connection` option (`URIConnection`).
1010

1111
```mermaid
1212
flowchart TB
@@ -183,9 +183,9 @@ func main() {
183183
userID := "user1"
184184
message := "Hello"
185185

186-
client := copilot.NewClient(&copilot.ClientOptions{
187-
Connection: copilot.UriConnection{URL: "localhost:4321"},
188-
})
186+
client := copilot.NewClient(&copilot.ClientOptions{
187+
Connection: copilot.URIConnection{URL: "localhost:4321"},
188+
})
189189
client.Start(ctx)
190190
defer client.Stop()
191191

@@ -202,7 +202,7 @@ func main() {
202202

203203
```go
204204
client := copilot.NewClient(&copilot.ClientOptions{
205-
Connection: copilot.UriConnection{URL: "localhost:4321"},
205+
Connection: copilot.URIConnection{URL: "localhost:4321"},
206206
})
207207
client.Start(ctx)
208208
defer client.Stop()

docs/setup/multi-tenancy.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,12 @@ func main() {
108108
requestID := "req-1"
109109
user := appUser{ID: "alice", GitHubToken: "gho_xxx"}
110110

111-
client := copilot.NewClient(&copilot.ClientOptions{
112-
Mode: copilot.ModeEmpty,
113-
BaseDirectory: fmt.Sprintf("/var/lib/my-app/copilot/%s", runtimeInstanceID),
114-
SessionIdleTimeoutSeconds: 900,
115-
Connection: copilot.UriConnection{URL: runtimeURL},
116-
})
111+
client := copilot.NewClient(&copilot.ClientOptions{
112+
Mode: copilot.ModeEmpty,
113+
BaseDirectory: fmt.Sprintf("/var/lib/my-app/copilot/%s", runtimeInstanceID),
114+
SessionIdleTimeoutSeconds: 900,
115+
Connection: copilot.URIConnection{URL: runtimeURL},
116+
})
117117

118118
session, err := client.CreateSession(ctx, &copilot.SessionConfig{
119119
SessionID: fmt.Sprintf("user-%s-%s", user.ID, requestID),
@@ -132,7 +132,7 @@ client := copilot.NewClient(&copilot.ClientOptions{
132132
Mode: copilot.ModeEmpty,
133133
BaseDirectory: fmt.Sprintf("/var/lib/my-app/copilot/%s", runtimeInstanceID),
134134
SessionIdleTimeoutSeconds: 900,
135-
Connection: copilot.UriConnection{URL: runtimeURL},
135+
Connection: copilot.URIConnection{URL: runtimeURL},
136136
})
137137

138138
session, err := client.CreateSession(ctx, &copilot.SessionConfig{
@@ -352,7 +352,7 @@ Use an external runtime connection when multiple SDK clients should share one al
352352
|----------|-----------------------------|
353353
| TypeScript | `RuntimeConnection.forUri(url)` |
354354
| Python | `RuntimeConnection.for_uri(url)` |
355-
| Go | `copilot.UriConnection{URL: url}` |
355+
| Go | `copilot.URIConnection{URL: url}` |
356356
| .NET | `RuntimeConnection.ForUri(url)` |
357357
| Java | `setCliUrl(url)` |
358358
| Rust | `Transport::External { host, port, connection_token }` |

0 commit comments

Comments
 (0)