diff --git a/api/client/cli.go b/api/client/cli.go index d5c2adc724..1686e28751 100644 --- a/api/client/cli.go +++ b/api/client/cli.go @@ -118,30 +118,6 @@ func (cli *DockerCli) CheckTtyInput(attachStdin, ttyMode bool) error { return nil } -// PsFormat returns the format string specified in the configuration. -// String contains columns and format specification, for example {{ID}}\t{{Name}}. -func (cli *DockerCli) PsFormat() string { - return cli.configFile.PsFormat -} - -// ImagesFormat returns the format string specified in the configuration. -// String contains columns and format specification, for example {{ID}}\t{{Name}}. -func (cli *DockerCli) ImagesFormat() string { - return cli.configFile.ImagesFormat -} - -// NetworksFormat returns the format string specified in the configuration. -// String contains columns and format specification, for example {{ID}}\t{{Name}} -func (cli *DockerCli) NetworksFormat() string { - return cli.configFile.NetworksFormat -} - -// VolumesFormat returns the format string specified in the configuration. -// String contains columns and format specification, for example {{ID}}\t{{Name}} -func (cli *DockerCli) VolumesFormat() string { - return cli.configFile.VolumesFormat -} - func (cli *DockerCli) setRawTerminal() error { if os.Getenv("NORAW") == "" { if cli.isTerminalIn { diff --git a/api/client/container/ps.go b/api/client/container/ps.go index e4624b17d8..aab910f7bc 100644 --- a/api/client/container/ps.go +++ b/api/client/container/ps.go @@ -101,8 +101,8 @@ func runPs(dockerCli *client.DockerCli, opts *psOptions) error { f := opts.format if len(f) == 0 { - if len(dockerCli.PsFormat()) > 0 && !opts.quiet { - f = dockerCli.PsFormat() + if len(dockerCli.ConfigFile().PsFormat) > 0 && !opts.quiet { + f = dockerCli.ConfigFile().PsFormat } else { f = "table" } diff --git a/api/client/image/images.go b/api/client/image/images.go index 460fb79801..78458871c5 100644 --- a/api/client/image/images.go +++ b/api/client/image/images.go @@ -79,8 +79,8 @@ func runImages(dockerCli *client.DockerCli, opts imagesOptions) error { f := opts.format if len(f) == 0 { - if len(dockerCli.ImagesFormat()) > 0 && !opts.quiet { - f = dockerCli.ImagesFormat() + if len(dockerCli.ConfigFile().ImagesFormat) > 0 && !opts.quiet { + f = dockerCli.ConfigFile().ImagesFormat } else { f = "table" } diff --git a/api/client/network/list.go b/api/client/network/list.go index 1bb5761511..3b6622f83e 100644 --- a/api/client/network/list.go +++ b/api/client/network/list.go @@ -71,8 +71,8 @@ func runList(dockerCli *client.DockerCli, opts listOptions) error { f := opts.format if len(f) == 0 { - if len(dockerCli.NetworksFormat()) > 0 && !opts.quiet { - f = dockerCli.NetworksFormat() + if len(dockerCli.ConfigFile().NetworksFormat) > 0 && !opts.quiet { + f = dockerCli.ConfigFile().NetworksFormat } else { f = "table" } diff --git a/api/client/volume/list.go b/api/client/volume/list.go index 1329803ae9..c0584ea8a2 100644 --- a/api/client/volume/list.go +++ b/api/client/volume/list.go @@ -68,8 +68,8 @@ func runList(dockerCli *client.DockerCli, opts listOptions) error { f := opts.format if len(f) == 0 { - if len(dockerCli.VolumesFormat()) > 0 && !opts.quiet { - f = dockerCli.VolumesFormat() + if len(dockerCli.ConfigFile().VolumesFormat) > 0 && !opts.quiet { + f = dockerCli.ConfigFile().VolumesFormat } else { f = "table" }