mirror of
https://github.com/moby/moby.git
synced 2026-08-03 14:41:03 +00:00
Cleanup unnecessary var.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
This commit is contained in:
@@ -151,12 +151,8 @@ func (daemon *Daemon) Install(eng *engine.Engine) error {
|
||||
// Get looks for a container by the specified ID or name, and returns it.
|
||||
// If the container is not found, or if an error occurs, nil is returned.
|
||||
func (daemon *Daemon) Get(name string) *Container {
|
||||
var (
|
||||
id string
|
||||
err error
|
||||
)
|
||||
|
||||
if id, err = daemon.idIndex.Get(name); err == nil {
|
||||
id, err := daemon.idIndex.Get(name)
|
||||
if err == nil {
|
||||
return daemon.containers.Get(id)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user