Do not duplicate Docker container output.

Since Docker containers are known by more than one name we were
returning them once for every name they're known by. This change makes
the returned containers unique.
lol :)
On Nov 17, 2014 11:14 AM, "Vish Kannan" <notifications@github.com> wrote:

> In manager/manager.go:
>
> > @@ -300,7 +300,13 @@ func (self *manager) DockerContainersInfo(containerName string, query *info.Cont
> >  		return nil, err
> >  	}
> >
> > -	return self.containerDataSliceToContainerInfoSlice(containers, query)
> > +	// Convert to a slice.
> > +	containersSlice := make([]*containerData, 0, len(containers))
> > +	for _, cont := range containers {
> > +		containersSlice = append(containersSlice, cont)
> > +	}
> > +
> > +	return self.containerDataSliceToContainerInfoSlice(containersSlice, query)
>
> Wow. Thats readability to the max [image: :100:]
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/google/cadvisor/pull/312/files#r20457076>.
>