Update example in README.md to close cli object

Signed-off-by: Mohd Sadiq <mohdsadiq058@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
msadiq058 2023-08-22 11:26:57 +05:30 committed by Sebastiaan van Stijn
parent 634f6ec1d4
commit f6b2e34268
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
2 changed files with 3 additions and 0 deletions

View file

@ -483,6 +483,8 @@ Milind Chawre <milindchawre@gmail.com>
Misty Stanley-Jones <misty@docker.com> <misty@apache.org>
Mohammad Banikazemi <MBanikazemi@gmail.com>
Mohammad Banikazemi <MBanikazemi@gmail.com> <mb@us.ibm.com>
Mohd Sadiq <mohdsadiq058@gmail.com> <mohdsadiq058@gmail.com>
Mohd Sadiq <mohdsadiq058@gmail.com> <42430865+msadiq058@users.noreply.github.com">
Mohit Soni <mosoni@ebay.com> <mohitsoni1989@gmail.com>
Moorthy RS <rsmoorthy@gmail.com> <rsmoorthy@users.noreply.github.com>
Moysés Borges <moysesb@gmail.com>

View file

@ -20,6 +20,7 @@ func main() {
if err != nil {
panic(err)
}
defer cli.Close()
containers, err := cli.ContainerList(context.Background(), types.ContainerListOptions{})
if err != nil {