comment updates for package internal/empty

This commit is contained in:
John Guo
2020-12-25 01:44:07 +08:00
parent 9c7aecf0fd
commit fc66a0715a

View File

@ -33,7 +33,8 @@ func IsEmpty(value interface{}) bool {
if value == nil {
return true
}
// It firstly checks the variable as common types using assertion, and then reflection.
// It firstly checks the variable as common types using assertion to enhance the performance,
// and then using reflection.
switch value := value.(type) {
case int:
return value == 0