Releases
v2.6.5
Compare
Sorry, something went wrong.
No results found
English
Upgrade go version from 1.18 to 1.21
SetLanguage method of Carbon struct add check for invalid Language struct
Parse method of Carbon struct add support for Postgres/SQLite time format string
Parse/ParseByLayout/ParseByFormat methods of Carbon struct change the return value from nil to empty carbon when parsing an empty string
Carbon struct add IsEmpty method to determine if it is an empty carbon
Carbon struct add ClearTestNow method to replace CleanTestNow, CleanTestNow will be removed in the future
Carbon struct add ParseByLayouts method to replace ParseWithLayouts, ParseWithLayouts will be removed in the future
Carbon struct add ParseByFormats method to replace ParseWithFormats, ParseWithFormats will be removed in the future
Carbon struct remove GormDataType method and change Value/MarshalJSON methods from pointer receiver to value receiver
LayoutType[T] struct remove GormDataType method and change Value/MarshalJSON methods from pointer receiver to value receiver
FormatType[T] struct remove GormDataType method and change Value/MarshalJSON methods from pointer receiver to value receiver
TimestampType[T] struct remove GormDataType method and change Value/MarshalJSON methods from pointer receiver to value receiver
SetResources method of Language struct add check invalid resources
Add curd integration testing for gorm, currently covering MySQL/Postgres/SQLite
Replace github.com/stretchr/testify/assert with github.com/stretchr/testify/suite for unit testing
中文
将 Go 最低版本要求从 1.18 提升到 1.21
Carbon 结构体的 SetLanguage 方法增加对非法 Language 结构体的判断
Carbon 结构体的Parse 方法增加对 Postgres/SQLite 时间格式字符串的解析支持
Carbon 结构体的Parse/ParseByLayout/ParseByFormat方法解析 空字符串 时返回值从 nil 更改成空 carbon
Carbon 结构体新增 IsEmpty 方法用于判断是否为空 carbon
Carbon 结构体新增 ClearTestNow 方法替代 CleanTestNow, CleanTestNow 方法未来将移除
Carbon 结构体新增 ParseByLayouts 方法替代 ParseWithLayouts, ParseWithLayouts 方法未来将移除
Carbon 结构体新增 ParseByFormats 方法替代 ParseWithLayouts, ParseWithFormats 方法未来将移除
Carbon 结构体移除 GormDataType 方法, 并将 Value/MarshalJSON 方法从指针接收者改成值接收者
LayoutType[T] 结构体移除 GormDataType 方法, 并将 Value/MarshalJSON 方法从指针接收者改成值接收者
FormatType[T] 结构体移除 GormDataType 方法, 并将 Value/MarshalJSON 方法从指针接收者改成值接收者
TimestampType[T] 结构体移除 GormDataType 方法, 并将 Value/MarshalJSON 方法从指针接收者改成值接收者
Language 结构体的 SetResources 方法增加对非法资源的判断
新增对 gorm 的 curd 集成测试,目前已覆盖 MySQL/Postgres/SQLite
使用 github.com/stretchr/testify/assert 替换 github.com/stretchr/testify/suite 进行单元测试
You can’t perform that action at this time.