升级数组操作

This commit is contained in:
2024-05-06 14:56:35 +08:00
parent 9ae0c8f4be
commit 3caad964bc
5 changed files with 47 additions and 252 deletions

View File

@ -108,30 +108,6 @@ func (to *ternaryOperator) StringWithFunc(condFunc CondFunc, trueVal String, fal
return to.String(condFunc(), trueVal, falseVal)
}
// Array ...
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 16:22 2023/11/28
func (to *ternaryOperator) Array(cond bool, trueVal *Array, falseVal *Array) *Array {
if cond {
return trueVal
}
return falseVal
}
// ArrayWithFunc ...
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 16:22 2023/11/28
func (to *ternaryOperator) ArrayWithFunc(condFunc CondFunc, trueVal *Array, falseVal *Array) *Array {
if nil == condFunc {
condFunc = defaultCondFunc
}
return to.Array(condFunc(), trueVal, falseVal)
}
// Map ...
//
// Author : go_developer@163.com<白茶清欢>