We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
String
TimestampType
1 parent e481ee5 commit ea0dee9Copy full SHA for ea0dee9
type_timestamp.go
@@ -159,10 +159,7 @@ func (t *TimestampType[T]) UnmarshalJSON(src []byte) error {
159
// String implements Stringer interface for TimestampType generic struct.
160
// 实现 Stringer 接口
161
func (t *TimestampType[T]) String() string {
162
- if t == nil {
163
- return "0"
164
- }
165
- if t.IsInvalid() || t.IsZero() {
+ if t == nil || t.IsInvalid() || t.IsZero() {
166
return "0"
167
}
168
return strconv.FormatInt(t.Int64(), 10)
0 commit comments