[lxc-devel] [lxd/master] Util: Fixes go vet conversion from int64 to string yields a string of one rune error
tomponline on Github
lxc-bot at linuxcontainers.org
Tue Mar 10 17:32:05 UTC 2020
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 361 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200310/a3eb8009/attachment.bin>
-------------- next part --------------
From a1418065d0ae9e2737ac83fac9527c910d3ad90d Mon Sep 17 00:00:00 2001
From: Thomas Parrott <thomas.parrott at canonical.com>
Date: Tue, 10 Mar 2020 17:28:32 +0000
Subject: [PATCH] lxd/util/fs: Fixes go vet conversion from int64 to string
yields a string of one rune error
Signed-off-by: Thomas Parrott <thomas.parrott at canonical.com>
---
lxd/util/fs.go | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lxd/util/fs.go b/lxd/util/fs.go
index 2b1ddf2488..0b9dfe9aac 100644
--- a/lxd/util/fs.go
+++ b/lxd/util/fs.go
@@ -1,6 +1,8 @@
package util
import (
+ "fmt"
+
"golang.org/x/sys/unix"
"github.com/lxc/lxd/shared/logger"
@@ -39,6 +41,6 @@ func FilesystemDetect(path string) (string, error) {
return "nfs", nil
default:
logger.Debugf("Unknown backing filesystem type: 0x%x", fs.Type)
- return string(fs.Type), nil
+ return fmt.Sprintf("0x%x", fs.Type), nil
}
}
More information about the lxc-devel
mailing list