mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-25 08:31:03 +00:00
rename to RefreshImages
This commit is contained in:
parent
38237be61d
commit
83b6cd7e27
3 changed files with 5 additions and 4 deletions
|
|
@ -100,8 +100,8 @@ func (i *Image) RenderHistory() (string, error) {
|
||||||
return utils.RenderList(layers, utils.WithHeader([]string{"ID", "TAG", "SIZE", "COMMAND"}))
|
return utils.RenderList(layers, utils.WithHeader([]string{"ID", "TAG", "SIZE", "COMMAND"}))
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetImages returns a slice of docker images
|
// RefreshImages returns a slice of docker images
|
||||||
func (c *DockerCommand) GetImages() ([]*Image, error) {
|
func (c *DockerCommand) RefreshImages() ([]*Image, error) {
|
||||||
images, err := c.Client.ImageList(context.Background(), types.ImageListOptions{})
|
images, err := c.Client.ImageList(context.Background(), types.ImageListOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,7 @@ func (gui *Gui) refreshImages() error {
|
||||||
|
|
||||||
// TODO: leave this to DockerCommand
|
// TODO: leave this to DockerCommand
|
||||||
func (gui *Gui) refreshStateImages() error {
|
func (gui *Gui) refreshStateImages() error {
|
||||||
Images, err := gui.DockerCommand.GetImages()
|
Images, err := gui.DockerCommand.RefreshImages()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,8 @@ func (gui *Gui) runCommand() error {
|
||||||
|
|
||||||
fmt.Fprintf(os.Stdout, "\n%s", utils.ColoredString(gui.Tr.PressEnterToReturn, color.FgGreen))
|
fmt.Fprintf(os.Stdout, "\n%s", utils.ColoredString(gui.Tr.PressEnterToReturn, color.FgGreen))
|
||||||
|
|
||||||
if _, err := fmt.Scanln(); err != nil { // wait for enter press
|
// wait for enter press
|
||||||
|
if _, err := fmt.Scanln(); err != nil {
|
||||||
gui.Log.Error(err)
|
gui.Log.Error(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue