---
title: "github.com/testcontainers/testcontainers-go (go) | Since.dev"
description: "What each github.com/testcontainers/testcontainers-go release on Go modules removed, renamed or changed, each with its source."
canonical_url: https://since.dev/packages/go/github.com/testcontainers/testcontainers-go
last_updated: 2026-06-19
---

# github.com/testcontainers/testcontainers-go breaking changes

Every breaking API change we have recorded in github.com/testcontainers/testcontainers-go on Go modules: 34 breaking changes in 2 versions. Below are its newest 2 versions, removals and renames first, each with its source.

Newest change June 19, 2026

## v0.43.0

1 breaking change, first published June 19, 2026.

- **Signature changed** `github.com/testcontainers/testcontainers-go/wait.ForSQL`  

The url callback passed to wait.ForSQL now takes a network.Port rather than a string port. Callbacks that need the string form must call port.String(), or use port.Port() or port.Proto(). [pkg.go.dev](https://pkg.go.dev/github.com/testcontainers/testcontainers-go@v0.43.0)

## v0.42.0

33 breaking changes, first published April 9, 2026.

- **Signature changed** `github.com/testcontainers/testcontainers-go.Container.MappedPort`  

Was func MappedPort(context.Context, nat.Port) (nat.Port, error); now func MappedPort(context.Context, string) (network.Port, error). [pkg.go.dev](https://pkg.go.dev/github.com/testcontainers/testcontainers-go@v0.42.0)
- **Signature changed** `github.com/testcontainers/testcontainers-go.Container.PortEndpoint`  

Was func PortEndpoint(context.Context, nat.Port, string) (string, error); now func PortEndpoint(context.Context, string, string) (string, error). [pkg.go.dev](https://pkg.go.dev/github.com/testcontainers/testcontainers-go@v0.42.0)
- **Signature changed** `github.com/testcontainers/testcontainers-go.Container.Ports`  

Was func Ports(context.Context) (nat.PortMap, error); now func Ports(context.Context) (network.PortMap, error). [pkg.go.dev](https://pkg.go.dev/github.com/testcontainers/testcontainers-go@v0.42.0)
- **Signature changed** `github.com/testcontainers/testcontainers-go.ContainerRequest.BuildOptions`  

Was func BuildOptions() (build.ImageBuildOptions, error); now func BuildOptions() (client.ImageBuildOptions, error). [pkg.go.dev](https://pkg.go.dev/github.com/testcontainers/testcontainers-go@v0.42.0)
- **Signature changed** `github.com/testcontainers/testcontainers-go.ContainerRequest.BuildOptionsModifier`  

Was BuildOptionsModifier func(\*build.ImageBuildOptions); now BuildOptionsModifier func(\*client.ImageBuildOptions). [pkg.go.dev](https://pkg.go.dev/github.com/testcontainers/testcontainers-go@v0.42.0)
- **Signature changed** `github.com/testcontainers/testcontainers-go.DeprecatedContainer.LivenessCheckPorts`  

Was func LivenessCheckPorts(context.Context) (nat.PortSet, error); now func LivenessCheckPorts(context.Context) (network.PortSet, error). [pkg.go.dev](https://pkg.go.dev/github.com/testcontainers/testcontainers-go@v0.42.0)
- **Signature changed** `github.com/testcontainers/testcontainers-go.DockerClient.DiskUsage`  

Was func DiskUsage(context.Context, types.DiskUsageOptions) (types.DiskUsage, error); now func DiskUsage(context.Context, client.DiskUsageOptions) (client.DiskUsageResult, error). [pkg.go.dev](https://pkg.go.dev/github.com/testcontainers/testcontainers-go@v0.42.0)
- **Signature changed** `github.com/testcontainers/testcontainers-go.DockerClient.Events`  

Was func Events(context.Context, events.ListOptions) (<-chan events.Message, <-chan error); now func Events(context.Context, client.EventsListOptions) client.EventsResult. [pkg.go.dev](https://pkg.go.dev/github.com/testcontainers/testcontainers-go@v0.42.0)
- **Signature changed** `github.com/testcontainers/testcontainers-go.DockerClient.Info`  

Was func Info(context.Context) (system.Info, error); now func Info(context.Context, client.InfoOptions) (client.SystemInfoResult, error). [pkg.go.dev](https://pkg.go.dev/github.com/testcontainers/testcontainers-go@v0.42.0)
- **Signature changed** `github.com/testcontainers/testcontainers-go.DockerClient.Ping`  

Was func Ping(context.Context) (types.Ping, error); now func Ping(context.Context, client.PingOptions) (client.PingResult, error). [pkg.go.dev](https://pkg.go.dev/github.com/testcontainers/testcontainers-go@v0.42.0)

And 23 more in this version.

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version, not only the newest. On Team and up, a fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous management.

Scan a public repository now, or give your agent one line.

### See how out of date your code is.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
