The highest tagged major version is
v2.
package
Version:
v1.30.11
Opens a new window with list of versions in this module.
Published: Mar 29, 2023
License: Apache-2.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func IsNil(obj interface{}) bool
IsNil
Deprecated: 反射有性能问题,应尽可能避免使用此方法.
PS:
(1) 如果某一变量的类型"不为指针",那么可以直接用"== nil"来判空.
(2) 如果某一变量的类型"可能为指针",那么需要用此方法来判空.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.