From 5845420649dd74f640cbdd5cdd692d669043dde8 Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Wed, 24 Aug 2022 20:20:34 +0800 Subject: [PATCH] Clean: use go 1.19 Appendf --- component/process/process_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/component/process/process_linux.go b/component/process/process_linux.go index 1dfd0eda..158a353c 100644 --- a/component/process/process_linux.go +++ b/component/process/process_linux.go @@ -166,7 +166,7 @@ func resolveProcessNameByProcSearch(inode, uid int32) (string, error) { } buffer := make([]byte, syscall.PathMax) - socket := []byte(fmt.Sprintf("socket:[%d]", inode)) + socket := fmt.Appendf(nil, "socket:[%d]", inode) for _, f := range files { if !f.IsDir() || !isPid(f.Name()) {