From f6d6fd259e7007c1e7e7b96e7b7a5fd5f1924de1 Mon Sep 17 00:00:00 2001 From: moogacs Date: Thu, 2 Jan 2025 09:01:16 +0100 Subject: [PATCH] resolve doc comments --- docs/features/garbage_collector.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/features/garbage_collector.md b/docs/features/garbage_collector.md index aab0e56ce3..4d0a1e08b2 100644 --- a/docs/features/garbage_collector.md +++ b/docs/features/garbage_collector.md @@ -17,9 +17,11 @@ The primary method is to use the `Terminate(context.Context)` function that is available when a container is created. Use `defer` to ensure that it is called on test completion. +The `Terminate` function can be customised with termination options to determine how a container is removed: termination timeout, and the ability to remove container volumes are supported at the moment. You can build the default options using the `testcontainers.NewTerminationOptions` function. + #### NewTerminateOptions -- Since testcontainers-go :material-tag: v0.35.0 +- Not available until the next release of testcontainers-go :material-tag: main If you want to attach option to container termination, you can use the `testcontainer.NewTerminateOptions(ctx context.Context, opts ...TerminateOption) *TerminateOptions` option, which receives a TerminateOption as parameter, creating custom termination options to be passed on the container termination.