diff --git a/probe/docker/registry.go b/probe/docker/registry.go index 01927ab2a..a3afc9500 100644 --- a/probe/docker/registry.go +++ b/probe/docker/registry.go @@ -44,7 +44,7 @@ type Registry interface { WatchContainerUpdates(ContainerUpdateWatcher) GetContainer(string) (Container, bool) GetContainerByPrefix(string) (Container, bool) - GetContainerImage(string) (*docker_client.APIImages, bool) + GetContainerImage(string) (docker_client.APIImages, bool) } // ContainerUpdateWatcher is the type of functions that get called when containers are updated. @@ -417,7 +417,7 @@ func (r *registry) GetContainerByPrefix(prefix string) (Container, bool) { return nil, false } -func (r *registry) GetContainerImage(id string) (*docker_client.APIImages, bool) { +func (r *registry) GetContainerImage(id string) (docker_client.APIImages, bool) { r.RLock() defer r.RUnlock() image, ok := r.images[id] diff --git a/probe/docker/reporter_test.go b/probe/docker/reporter_test.go index 7a8fde065..1a81bc0fc 100644 --- a/probe/docker/reporter_test.go +++ b/probe/docker/reporter_test.go @@ -48,7 +48,7 @@ func (r *mockRegistry) GetContainer(_ string) (docker.Container, bool) { return func (r *mockRegistry) GetContainerByPrefix(_ string) (docker.Container, bool) { return nil, false } -func (r *mockRegistry) GetContainerImage(id string) (*client.APIImages, bool) { +func (r *mockRegistry) GetContainerImage(id string) (client.APIImages, bool) { image, ok := r.images[id] return image, ok }