[lxc-devel] [lxd/master] lxc: Don't show header in CSV output

stgraber on Github lxc-bot at linuxcontainers.org
Thu Aug 15 14:39:35 UTC 2019


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 354 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190815/fe43e38a/attachment.bin>
-------------- next part --------------
From ec6b1c50d48983e0267cec90bb6370ea5e4bb3d3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Thu, 15 Aug 2019 10:39:21 -0400
Subject: [PATCH] lxc: Don't show header in CSV output
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: St├ęphane Graber <stgraber at ubuntu.com>
---
 lxc/utils.go | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/lxc/utils.go b/lxc/utils.go
index 16972d3261..4de856bc1b 100644
--- a/lxc/utils.go
+++ b/lxc/utils.go
@@ -276,9 +276,6 @@ func renderTable(format string, header []string, data [][]string, raw interface{
 		table.AppendBulk(data)
 		table.Render()
 	case listFormatCSV:
-		data = append(data, []string{})
-		copy(data[1:], data[0:])
-		data[0] = header
 		w := csv.NewWriter(os.Stdout)
 		w.WriteAll(data)
 


More information about the lxc-devel mailing list