[lxc-devel] [lxd/master] lxc/profile: Make json/yaml consistent

stgraber on Github lxc-bot at linuxcontainers.org
Fri Feb 8 00:25:21 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/20190207/48bf006b/attachment.bin>
-------------- next part --------------
From 03ae822a43506311b7d92a50665d8bf45a85ca23 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Thu, 7 Feb 2019 19:24:56 -0500
Subject: [PATCH] lxc/profile: Make json/yaml consistent
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/profile.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lxc/profile.go b/lxc/profile.go
index 251e71c4e7..d214d32fcf 100644
--- a/lxc/profile.go
+++ b/lxc/profile.go
@@ -646,13 +646,13 @@ func (c *cmdProfileList) Run(cmd *cobra.Command, args []string) error {
 
 	case listFormatJSON:
 		enc := json.NewEncoder(os.Stdout)
-		err := enc.Encode(data)
+		err := enc.Encode(profiles)
 		if err != nil {
 			return err
 		}
 
 	case listFormatYAML:
-		out, err := yaml.Marshal(data)
+		out, err := yaml.Marshal(profiles)
 		if err != nil {
 			return err
 		}


More information about the lxc-devel mailing list