# \#go-sdk

**URL:** https://forums.docker.com/tag/go-sdk/97.md

[Latest](https://forums.docker.com/latest.md) · [Categories](https://forums.docker.com/categories.md) · [Tags](https://forums.docker.com/tags.md)

---

## [Using Docker Engine SDKs and Docker APIs (golang), I am able to have all log result displayed in my terminal, except for the one was generated by unittest. Why and how to store the unittest log into a variable so I can send it to elsewhere like my fronten](https://forums.docker.com/t/using-docker-engine-sdks-and-docker-apis-golang-i-am-able-to-have-all-log-result-displayed-in-my-terminal-except-for-the-one-was-generated-by-unittest-why-and-how-to-store-the-unittest-log-into-a-variable-so-i-can-send-it-to-elsewhere-like-my-fronten/142065)

<div class="topic-metadata">

**Author:** [@trietdao301](https://forums.docker.com/u/trietdao301)\
**Replies:** 0\
**Last updated:** [June 19, 2024, 7:58am UTC](https://forums.docker.com/t/using-docker-engine-sdks-and-docker-apis-golang-i-am-able-to-have-all-log-result-displayed-in-my-terminal-except-for-the-one-was-generated-by-unittest-why-and-how-to-store-the-unittest-log-into-a-variable-so-i-can-send-it-to-elsewhere-like-my-fronten/142065 "2024-06-19T07:58:52Z")

</div>

package main import ( "context" "fmt" "os" "path/filepath" "github.com/docker/docker/api/types/container" "github.com/docker/docker/client" "github.com/docker/docker/pkg/stdcopy" ) func main() { userCode := \` …

---

## [Using buildkitd to build an image on OSX via the Go SDK](https://forums.docker.com/t/using-buildkitd-to-build-an-image-on-osx-via-the-go-sdk/139415)

<div class="topic-metadata">

**Author:** [@dantdj](https://forums.docker.com/u/dantdj)\
**Replies:** 0\
**Last updated:** [January 19, 2024, 4:39pm UTC](https://forums.docker.com/t/using-buildkitd-to-build-an-image-on-osx-via-the-go-sdk/139415 "2024-01-19T16:39:53Z")

</div>

Hey folks, I’m looking at trying to use Buildkit’s Go SDK (GitHub - moby/buildkit: concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit) in order to build images on OSX (and Windows in future). However, …

---

## [Forward SSH agent to container](https://forums.docker.com/t/forward-ssh-agent-to-container/138369)

<div class="topic-metadata">

**Author:** [@shamilnunhuck](https://forums.docker.com/u/shamilnunhuck)\
**Replies:** 3\
**Last updated:** [November 9, 2023, 12:56pm UTC](https://forums.docker.com/t/forward-ssh-agent-to-container/138369 "2023-11-09T12:56:12Z")

</div>

I am using the SDK to start a container, and I need to forward the host’s SSH agent to the container. How do I do this with the Go SDK? The primary deployment target for the Go app is a Mac for now, and I’m aware of som…

---

## [Cant connect to docker from Docker Go Client in windows with wsl2](https://forums.docker.com/t/cant-connect-to-docker-from-docker-go-client-in-windows-with-wsl2/137334)

<div class="topic-metadata">

**Author:** [@jackkweyunga](https://forums.docker.com/u/jackkweyunga)\
**Replies:** 1\
**Last updated:** [August 28, 2023, 7:39pm UTC](https://forums.docker.com/t/cant-connect-to-docker-from-docker-go-client-in-windows-with-wsl2/137334 "2023-08-28T19:39:16Z")

</div>

Here is how I retrieve the client func getClient() \*client.Client { cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) if err != nil { panic(fmt.Sprintf("Error getting client:…
