# {{title}} Go SDK
Version: {{version}}
{{#if description}}
{{description}}
{{/if}}
## Installation
```bash
go get {{moduleName}}
```
## Usage
```go
package main
import (
"context"
"fmt"
"log"
"{{moduleName}}"
)
func main() {
// Create configuration
config := {{packageName}}.NewConfig()
config.BaseURL = "{{baseUrl}}"
{{#if includeAuth}}
// Set authentication
config.BearerToken = "your-token"
// or
config.APIKey = "your-api-key"
{{/if}}
// Create client
client := {{packageName}}.NewClient(config)
// Make API calls
ctx := context.Background()
{{#each operations}}
{{#if @first}}
result, err := client.{{operation_id}}(ctx)
if err != nil {
log.Fatal(err)
}
fmt.Printf("Result: %+v\n", result)
{{/if}}
{{/each}}
}
```
## Error Handling
```go
result, err := client.SomeOperation(ctx)
if err != nil {
if apiErr, ok := err.(*{{packageName}}.APIError); ok {
fmt.Printf("API error %d: %s\n", apiErr.StatusCode, apiErr.Message)
} else {
fmt.Printf("Network error: %v\n", err)
}
}
```
## Available Operations
{{#each operations}}
- `{{operation_id}}()` - {{#if summary}}{{summary}}{{else}}{{method}} {{path}}{{/if}}
{{/each}}
## Configuration
The `Config` struct supports the following options:
- `BaseURL` - API base URL (default: `{{baseUrl}}`)
{{#if includeAuth}}
- `BearerToken` - Bearer token for authentication
- `APIKey` - API key for authentication
{{/if}}
{{#if includeResilience}}
- `Timeout` - Request timeout (default: 30s)
- `MaxRetries` - Maximum number of retries (default: 3)
- `RetryDelay` - Delay between retries (default: 1s)
{{/if}}
---
Generated by [MicroRapid](https://github.com/yourusername/microrapid)