> For the complete documentation index, see [llms.txt](https://docs.licensespring.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.licensespring.com/sdks/go-sdk/v1-legacy/common.md).

# Common

{% hint style="info" %}
LicenseSpring’s new [**Go SDK V2**](broken://pages/ae2a7abe98ac54bb39ee8fc9e008316b6c214907) is now available! This version is a complete rewrite with breaking changes and will receive all future updates and support.

The legacy Go SDK (v1) is deprecated and maintained for backward compatibility only. New users should use v2.
{% endhint %}

Go SDK is divided into 3 clients:

* Floating client
* License client
* Management client

### Response Types

There are 3 response wrapper types. These are used for future extendability and ease of use.

* Client.Response
* Management\_response.SearchResult
* Error

#### Client.Response

Response type is used by all 3 clients, and it's a generic wrapper for any request:

```go
type Response[T any] struct {
	Payload []byte // raw response JSON
	Value   T      // typed value
	Error   error  // error, if it exists
}
```

As an example, license\_client.ActivateLicense would return client.Response\[LicenseResponse], so response.Value would be of type LicenseResponse. Example:

```go
resp := client.ActivateLicense(context.Background(), ...)

// access LicenseResponse fields
resp.Value.LicenseKey

// or get whole LicenseResponse struct
license := resp.Value
license.LicenseKey
```

#### Management\_response.SearchResult

SearchResult is used only in management client to wrap search/list request responses. For example, for [**ListCustomers**](https://docs.licensespring.com/docs/list-customers) requests.

#### Error

Error type is commonly used as response for Delete requests, e.g. [**DeleteCustomer**](https://docs.licensespring.com/docs/delete-customer).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.licensespring.com/sdks/go-sdk/v1-legacy/common.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
