> This page is for SDKs, version Current (default).
> For other versions, use one of these documentation indexes:
> - Current (default): https://buildwithfern.com/learn/sdks/current/llms.txt
> - Legacy: https://buildwithfern.com/learn/sdks/legacy/llms.txt

> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt.

# Go configuration

> Configuration options for the Go target in sdk-config.yml.

Configure the Go SDK in the `generation` block of its target in `sdk-config.yml`:

**`sdk-config.yml`**

```yaml {3-8} title="sdk-config.yml"
targets:
  - language: go
    generation:
      naming:
        clientName: YourClientName
      legacyComplexModels: true
      smartCasing: true
      unionVersion: v0
```

The target's `generation` block also accepts the [shared generation options](/learn/sdks/reference/sdk-config#generation), such as `naming`, `wireTests`, and `customCode`. Shared options set in the top-level `generation` block apply to every target, and a target's `generation` block overrides them. For `generators.yml` options, see the [Legacy Go configuration](/learn/sdks/legacy/generators/go/configuration).

## Go options

**`legacyComplexModels`** `boolean`

Whether complex models use the legacy Go representation.

---

**`smartCasing`** `boolean`

Whether generated Go names capitalize common initialisms.

---

**`clientConstructorName`** `string`

The generated root-client constructor name.

---

\<ParamField path="unionVersion" type=""v0" | "v1"" required= toc=>
The representation used for generated Go unions.
\</ParamField>

**`includeLegacyClientOptions`** `boolean`

Whether the client retains legacy constructor option helpers.

---