improve error handling for custom validation rule for package gvalid

This commit is contained in:
John Guo
2021-11-14 17:47:21 +08:00
parent 1a7450b9e9
commit ce16dad88f
5 changed files with 41 additions and 11 deletions

View File

@ -97,7 +97,7 @@ func (set *Set) AddIfNotExist(item interface{}) bool {
}
// AddIfNotExistFunc checks whether item exists in the set,
// it adds the item to set and returns true if it does not exists in the set and
// it adds the item to set and returns true if it does not exist in the set and
// function `f` returns true, or else it does nothing and returns false.
//
// Note that, if `item` is nil, it does nothing and returns false. The function `f`