重构白银节点分配方式,使用手动接口精确配置节点

This commit is contained in:
2025-12-08 14:22:30 +08:00
parent 9e237be21e
commit 983dbb4564
25 changed files with 651 additions and 630 deletions

View File

@@ -25,6 +25,15 @@ func ElseTo[A any, B any](a *A, f func(A) B) *B {
}
}
// 三元表达式
func Ternary[T any](condition bool, trueValue T, falseValue T) T {
if condition {
return trueValue
} else {
return falseValue
}
}
// ====================
// 指针
// ====================