---
title: "Go | Speedscale Docs"
description: "Go guidance for Speedscale and proxymock, including proxy setup, TLS trust, demo app details, and a first-success workflow."
canonical: "https://docs.speedscale.com/reference/languages/golang/"
---

[Documentation index](https://docs.speedscale.com/reference/llms.txt) | [Markdown](https://docs.speedscale.com/reference/languages/golang/index.md) | [Canonical page](https://docs.speedscale.com/reference/languages/golang/)

# Go

Go is fully supported by Speedscale. Use this page for Go-specific proxy settings, TLS trust configuration, demo guidance, and the proxymock local workflow.

*   Support matrix: [Technology Support](https://docs.speedscale.com/reference/technology-support/)
*   Shared proxymock proxy reference: [Language Configuration](https://docs.speedscale.com/proxymock/getting-started/language-reference/)

<a id="kubernetes-sidecar"></a>

## Kubernetes Sidecar

When Go runs with the Speedscale sidecar in `forward` or `dual` mode, the Go runtime must still send outbound traffic to the sidecar. Set `HTTP_PROXY` and `HTTPS_PROXY` to `http://127.0.0.1:4140` unless you changed `proxy-out-port`.

If `tls-out` is enabled, trust and routing are separate concerns:

*   routing: `HTTP_PROXY` and `HTTPS_PROXY`
*   TLS trust: `SSL_CERT_FILE` or the language-specific trust mechanism in your image

See [Proxy Modes](https://docs.speedscale.com/getting-started/installation/sidecar/proxy-modes/) and [TLS Support](https://docs.speedscale.com/getting-started/installation/sidecar/tls/) for the shared sidecar behavior.

<a id="demo-app"></a>

## Demo App

*   Public demo: [speedscale/mock-lab](https://github.com/speedscale/mock-lab) (`languages/go` directory)
*   Stack: Go HTTP service that calls one downstream, the CNCF projects API at `https://demo-api.trafficreplay.com`
*   Local run: `go run .`
*   Quick validation: `./lab/tests/run_tests.sh --recording`

This is the canonical public Go demo for the proxymock quickstart and local replay workflow.

<a id="proxymock"></a>

## proxymock

Use this path for the fastest Go first success on a developer workstation.

1.  1. Install and initialize proxymock
    
    ```
    brew install speedscale/tap/proxymock
    proxymock init
    ```
    
    Use browser sign-in by default. Use \`proxymock init --api-key <your key>\` only for CI or other headless environments.
    
2.  2. Start recording
    
    ```
    git clone https://github.com/speedscale/mock-lab
    cd mock-lab/languages/go
    proxymock record -- go run .
    ```
    
    proxymock records the app while it starts the Go service as a child process.
    
3.  3. Generate one real workflow
    
    ```
    ./lab/tests/run_tests.sh --recording
    ```
    
    Run the test driver from the repo root. It drives the requests that become the exported production-style trace.
    
4.  4. Stop the recording, then run with mocks
    
    ```
    cd mock-lab/languages/go
    proxymock mock -- go run .
    ```
    
    The mocked run should no longer need live outbound dependencies.
    
5.  5. Replay the same traffic against a change
    
    ```
    cd mock-lab/languages/go
    proxymock replay --test-against http://localhost:8080
    ```
    
    Use replay as the regression check before shipping Go changes.
    

<a id="tls-trust"></a>

## TLS Trust

Go reads `SSL_CERT_FILE` on Linux. Go 1.27 and later also reads it on macOS and Windows. Earlier versions use the keychain on macOS and the Windows certificate store on Windows; see [Windows certificate store](https://docs.speedscale.com/proxymock/getting-started/language-reference/#windows-tls-trust). See the shared [Language Configuration](https://docs.speedscale.com/proxymock/getting-started/language-reference/#tls-trust) page for the exact command and any OpenSSL-specific notes.
