Last updated: November 29, 2024

<span aria-hidden="true" id="major-improvements-to-our-go-sdk"></span>

# Major improvements to our Go SDK

![Marius Kleidl](/assets/images/teammates/avatar-acconut-1.jpg?dpl=dpl_C6YH6XrtnwbHLJcm1LDKywQn4CB3)

#### Marius Kleidl

Software Engineer · Munich, Germany · Show bio

[](https://x.com/Acconut%5F)[](https://github.com/Acconut)

At Transloadit, we are huge fans of the Go programming language. Not only due to its simplicity, but also its ability to power efficient systems. In fact, one of our core components, which is responsible for managing the clusters of machines on AWS, is written using Go. And so is[tusd⁠](https://github.com/tus/tusd), the reference server implementation for [tus⁠](https://tus.io) - our open protocol for resumable file uploads. That's why we were excited when we[first released the official Transloadit Go SDK](/blog/2014/11/releasing-our-new-go-sdk.md)back in 2014.

However, with the SDK nearing its third birthday, we decided to sit down and give it a facelift. And here we are today, proud to share the result with you by announcing the **1.0 release of the Go SDK**! Version 1.0 features a fully revised API interface, full documentation and support for[Go's context package⁠](https://blog.golang.org/context). The latter is useful for defining request timeouts in order to prevent hang-ups.

Let's jump straight into code and let me guide you through a brief example:

1. Firstly, make sure that you have Go 1.7 or higher installed. If not, please[download it⁠](https://golang.org/dl/). Afterwards, we can install the package by simply running the following command:

```bash
go get -u gopkg.in/transloadit/go-sdk.v1  
```

That's all you need to do to install it. In order to complete the remaining steps, we can move directly to the code.
2\. Secondly, we create a new Client instance by extending the default configuration with your[API credentials](/c/template-credentials/):

```go
options := transloadit.DefaultConfig  
options.AuthKey = "AUTH_KEY"  
options.AuthSecret = "AUTH_SECRET"  
client := transloadit.NewClient(options)  
```

3. Next, we create the Assembly struct, add a file to upload and define the instructions for how to process it:

```go
assembly := transloadit.NewAssembly()  
assembly.AddFile("image", "./path/to/your/file")  
assembly.AddStep("resize", map[string]interface{}{  
  "robot":           "/image/resize",  
  "width":           75,  
  "height":          75,  
  "resize_strategy": "pad",  
  "background":      "#000000",  
})  
```

4. After specifying our instructions, it is time to transmit them to Transloadit and start executing the necessary operations:

```go
info, err := client.StartAssembly(context.Background(), assembly)  
```

5. Finally, we should wait until execution has finished and our results are available:

```go
info, err = client.WaitForAssembly(context.Background(), info)  
fmt.Printf("You can view the result at: %s\n", info.Results["resize"][0].SSLURL)  
```

And that's it! You have just successfully executed your first assembly using our new Go SDK! If you'd like to know even more, please have a look at these additional resources:

* Examples: [https://github.com/transloadit/go-sdk/tree/master/examples⁠](https://github.com/transloadit/go-sdk/tree/master/examples)
* Source Code: [https://github.com/transloadit/go-sdk⁠](https://github.com/transloadit/go-sdk)
* Documentation: [https://godoc.org/gopkg.in/transloadit/go-sdk.v1⁠](https://godoc.org/gopkg.in/transloadit/go-sdk.v1)

P.S. We are currently dedicating more of our efforts into improving our SDKs to bring you the best possible experience. So, stay tuned for future announcements like this one!

[#integrations](/blog/tags/integrations.md)[#go-sdk](/blog/tags/go-sdk.md)

### 👩‍💻 Join 20k+ developers

Sign up for our [monthly newsletter](/newsletters.md) to receive direct links to 3 exclusive tech — and 2 product updates. No less, no more.

Your email:

Get access

## File uploading and encoding. Made simple.

Transloadit streamlines file handling for developers, trusted by brands like Coursera and The New York Times. We’re known for a reliable API, top-notch support, and a strong commitment to open source, with projects like [Uppy⁠](https://uppy.io) and [Tus⁠](https://tus.io) setting standards in file processing.

[Sign up](/c/)[Book a Demo](https://survey.typeform.com/to/kRg47Xi5)

No credit card needed · 5 GB included in the free plan

Cancel anytime
