diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2020-06-09 16:47:30 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2020-06-10 05:49:41 -0400 |
commit | 4bb43b898d72cb938d317055e4ade2771cfc9c54 (patch) | |
tree | 4d3f87d922da20d575615cdd50f19b61d9fa4bc1 /cmd/podman/networks/list.go | |
parent | fbe09d78e91c9ac5cadc8b00a67c7d7f89d64868 (diff) | |
download | podman-4bb43b898d72cb938d317055e4ade2771cfc9c54.tar.gz podman-4bb43b898d72cb938d317055e4ade2771cfc9c54.tar.bz2 podman-4bb43b898d72cb938d317055e4ade2771cfc9c54.zip |
Fixup issues found by golint
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman/networks/list.go')
-rw-r--r-- | cmd/podman/networks/list.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cmd/podman/networks/list.go b/cmd/podman/networks/list.go index 24604c055..498a4dc18 100644 --- a/cmd/podman/networks/list.go +++ b/cmd/podman/networks/list.go @@ -33,8 +33,8 @@ var ( var ( networkListOptions entities.NetworkListOptions - headers string = "NAME\tVERSION\tPLUGINS\n" - defaultListRow string = "{{.Name}}\t{{.Version}}\t{{.Plugins}}\n" + headers = "NAME\tVERSION\tPLUGINS\n" + defaultListRow = "{{.Name}}\t{{.Version}}\t{{.Plugins}}\n" ) func networkListFlags(flags *pflag.FlagSet) { @@ -57,7 +57,7 @@ func init() { func networkList(cmd *cobra.Command, args []string) error { var ( - nlprs []NetworkListPrintReports + nlprs []ListPrintReports ) // validate the filter pattern. @@ -83,7 +83,7 @@ func networkList(cmd *cobra.Command, args []string) error { } for _, r := range responses { - nlprs = append(nlprs, NetworkListPrintReports{r}) + nlprs = append(nlprs, ListPrintReports{r}) } row := networkListOptions.Format @@ -125,14 +125,14 @@ func jsonOut(responses []*entities.NetworkListReport) error { return nil } -type NetworkListPrintReports struct { +type ListPrintReports struct { *entities.NetworkListReport } -func (n NetworkListPrintReports) Version() string { +func (n ListPrintReports) Version() string { return n.CNIVersion } -func (n NetworkListPrintReports) Plugins() string { +func (n ListPrintReports) Plugins() string { return network.GetCNIPlugins(n.NetworkConfigList) } |