From f307299246e62cf484214d83c9fc41c2a106511b Mon Sep 17 00:00:00 2001 From: tyltr Date: Thu, 7 Oct 2021 00:03:16 +0800 Subject: [PATCH] feat:no need to store nil (#1116) * feat:no need to store nil * lint --- userdata.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/userdata.go b/userdata.go index bd3e28aa1d..8d2eff9f74 100644 --- a/userdata.go +++ b/userdata.go @@ -21,6 +21,9 @@ func (d *userData) Set(key string, value interface{}) { return } } + if value == nil { + return + } c := cap(args) if c > n {