rename to RefreshImages

This commit is contained in:
Jesse Duffield 2019-06-23 17:26:55 +10:00
parent 38237be61d
commit 83b6cd7e27
3 changed files with 5 additions and 4 deletions

View file

@ -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

View file

@ -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
} }

View file

@ -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)
} }