small refactor and fixes

This commit is contained in:
yusing
2024-12-03 11:45:10 +08:00
parent cebc0c5405
commit 5d5c623f09
12 changed files with 46 additions and 52 deletions

View File

@@ -8,12 +8,11 @@ import (
func Inspect(dockerHost string, containerID string) (*Container, error) {
client, err := ConnectClient(dockerHost)
defer client.Close()
if err != nil {
return nil, err
}
defer client.Close()
return client.Inspect(containerID)
}