From d815c9779177c04b323be121e8ad9dd9018b0ae6 Mon Sep 17 00:00:00 2001 From: Hui Zhu Date: Tue, 9 Apr 2019 15:39:17 +0800 Subject: [PATCH] lint: Update code to handle lint issues Update code to handle lint issues after golangci-lint update to v1.6.0. Fixes: #527 Signed-off-by: Hui Zhu --- grpc_test.go | 66 ++++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/grpc_test.go b/grpc_test.go index b660d85eec..57eb4e1401 100644 --- a/grpc_test.go +++ b/grpc_test.go @@ -869,42 +869,42 @@ func TestPosixRlimitsToRlimits(t *testing.T) { assert := assert.New(t) expectedRlimits := []configs.Rlimit{ - {unix.RLIMIT_CPU, 100, 120}, - {unix.RLIMIT_FSIZE, 100, 120}, - {unix.RLIMIT_DATA, 100, 120}, - {unix.RLIMIT_STACK, 100, 120}, - {unix.RLIMIT_CORE, 100, 120}, - {unix.RLIMIT_RSS, 100, 120}, - {unix.RLIMIT_NPROC, 100, 120}, - {unix.RLIMIT_NOFILE, 100, 120}, - {unix.RLIMIT_MEMLOCK, 100, 120}, - {unix.RLIMIT_AS, 100, 120}, - {unix.RLIMIT_LOCKS, 100, 120}, - {unix.RLIMIT_SIGPENDING, 100, 120}, - {unix.RLIMIT_MSGQUEUE, 100, 120}, - {unix.RLIMIT_NICE, 100, 120}, - {unix.RLIMIT_RTPRIO, 100, 120}, - {unix.RLIMIT_RTTIME, 100, 120}, + {Type: unix.RLIMIT_CPU, Hard: 100, Soft: 120}, + {Type: unix.RLIMIT_FSIZE, Hard: 100, Soft: 120}, + {Type: unix.RLIMIT_DATA, Hard: 100, Soft: 120}, + {Type: unix.RLIMIT_STACK, Hard: 100, Soft: 120}, + {Type: unix.RLIMIT_CORE, Hard: 100, Soft: 120}, + {Type: unix.RLIMIT_RSS, Hard: 100, Soft: 120}, + {Type: unix.RLIMIT_NPROC, Hard: 100, Soft: 120}, + {Type: unix.RLIMIT_NOFILE, Hard: 100, Soft: 120}, + {Type: unix.RLIMIT_MEMLOCK, Hard: 100, Soft: 120}, + {Type: unix.RLIMIT_AS, Hard: 100, Soft: 120}, + {Type: unix.RLIMIT_LOCKS, Hard: 100, Soft: 120}, + {Type: unix.RLIMIT_SIGPENDING, Hard: 100, Soft: 120}, + {Type: unix.RLIMIT_MSGQUEUE, Hard: 100, Soft: 120}, + {Type: unix.RLIMIT_NICE, Hard: 100, Soft: 120}, + {Type: unix.RLIMIT_RTPRIO, Hard: 100, Soft: 120}, + {Type: unix.RLIMIT_RTTIME, Hard: 100, Soft: 120}, } posixRlimits := []specs.POSIXRlimit{ - {"RLIMIT_CPU", 100, 120}, - {"RLIMIT_FSIZE", 100, 120}, - {"RLIMIT_DATA", 100, 120}, - {"RLIMIT_STACK", 100, 120}, - {"RLIMIT_CORE", 100, 120}, - {"RLIMIT_RSS", 100, 120}, - {"RLIMIT_NPROC", 100, 120}, - {"RLIMIT_NOFILE", 100, 120}, - {"RLIMIT_MEMLOCK", 100, 120}, - {"RLIMIT_AS", 100, 120}, - {"RLIMIT_LOCKS", 100, 120}, - {"RLIMIT_SIGPENDING", 100, 120}, - {"RLIMIT_MSGQUEUE", 100, 120}, - {"RLIMIT_NICE", 100, 120}, - {"RLIMIT_RTPRIO", 100, 120}, - {"RLIMIT_RTTIME", 100, 120}, - {"RLIMIT_UNSUPPORTED", 0, 0}, + {Type: "RLIMIT_CPU", Hard: 100, Soft: 120}, + {Type: "RLIMIT_FSIZE", Hard: 100, Soft: 120}, + {Type: "RLIMIT_DATA", Hard: 100, Soft: 120}, + {Type: "RLIMIT_STACK", Hard: 100, Soft: 120}, + {Type: "RLIMIT_CORE", Hard: 100, Soft: 120}, + {Type: "RLIMIT_RSS", Hard: 100, Soft: 120}, + {Type: "RLIMIT_NPROC", Hard: 100, Soft: 120}, + {Type: "RLIMIT_NOFILE", Hard: 100, Soft: 120}, + {Type: "RLIMIT_MEMLOCK", Hard: 100, Soft: 120}, + {Type: "RLIMIT_AS", Hard: 100, Soft: 120}, + {Type: "RLIMIT_LOCKS", Hard: 100, Soft: 120}, + {Type: "RLIMIT_SIGPENDING", Hard: 100, Soft: 120}, + {Type: "RLIMIT_MSGQUEUE", Hard: 100, Soft: 120}, + {Type: "RLIMIT_NICE", Hard: 100, Soft: 120}, + {Type: "RLIMIT_RTPRIO", Hard: 100, Soft: 120}, + {Type: "RLIMIT_RTTIME", Hard: 100, Soft: 120}, + {Type: "RLIMIT_UNSUPPORTED", Hard: 0, Soft: 0}, } rlimits := posixRlimitsToRlimits(posixRlimits)