Quickstart

Code examples

qianmoQqianmoQ· 更新于 2026-10-14· 阅读 1 分钟· 0 次阅读

登录后可跨设备保存划线和私人笔记登录

Code examples

In this section you'll discover how to create code examples for Testcontainers for Go, which are almost the same as Go modules, but without exporting any public API.

Their main goal is to create shareable code snippets on how to use certain technology (e.g. a database, a web server), in order to explore its usage before converting the example module into a real Go module exposing a public API.

Interested in adding a new example?

Please refer to the documentation of the code generation tool here.

Update Go dependencies in the examples

To update the Go dependencies in the examples, please run:

$ cd examples
$ make tidy-examples

评论

登录后参与评论

正在加载评论…