github.com/slene/docker@v1.8.0-rc1/daemon/restart.go (about) 1 package daemon 2 3 import "fmt" 4 5 func (daemon *Daemon) ContainerRestart(name string, seconds int) error { 6 container, err := daemon.Get(name) 7 if err != nil { 8 return err 9 } 10 if err := container.Restart(seconds); err != nil { 11 return fmt.Errorf("Cannot restart container %s: %s\n", name, err) 12 } 13 return nil 14 }