优化数据库结构与数据插入逻辑
This commit is contained in:
13
pkg/u/u.go
Normal file
13
pkg/u/u.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package u
|
||||
|
||||
import "time"
|
||||
|
||||
// P 是一个工具函数,用于在表达式内原地创建一个指针
|
||||
func P[T any](v T) *T {
|
||||
return &v
|
||||
}
|
||||
|
||||
func Today() time.Time {
|
||||
var now = time.Now()
|
||||
return time.Date(now.Year(), now.Month(), now.Day(), 0, 0, 0, 0, now.Location())
|
||||
}
|
||||
Reference in New Issue
Block a user