- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for Unix (0.16 sec)
-
utils/utils_unix_test.go
//go:build unix // +build unix package utils import ( "testing" ) func TestSourceDir(t *testing.T) { cases := []struct { file string want string }{ { file: "/Users/name/go/pkg/mod/gorm.io/gorm@v1.2.3/utils/utils.go", want: "/Users/name/go/pkg/mod/gorm.io/", }, { file: "/go/work/proj/gorm/utils/utils.go", want: "/go/work/proj/gorm/", }, {
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Mon Nov 21 02:48:13 GMT 2022 - 731 bytes - Viewed (0) -
tests/customize_field_test.go
t.Fatalf("invalid create/update unix time: %#v", result) } if int(result.AutoUnixMilliCreateTime) != int(result.AutoUnixMilliUpdateTime) || result.AutoUnixMilliCreateTime == 0 || int(result.AutoUnixMilliCreateTime)/int(result.AutoUnixCreateTime) < 1e3 { t.Fatalf("invalid create/update unix milli time: %#v", result) }
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Fri Sep 11 09:33:31 GMT 2020 - 6.9K bytes - Viewed (0) -
callbacks/create.go
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Mon Apr 08 03:29:55 GMT 2024 - 12.5K bytes - Viewed (0) -
tests/serializer_test.go
} createdAt := time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC) updatedAt := createdAt.Unix() data := SerializerStruct{ Name: []byte("jinzhu"), Roles: []string{"r1", "r2"}, Contracts: map[string]interface{}{"name": "jinzhu", "age": 10}, EncryptedString: EncryptedString("pass"), CreatedTime: createdAt.Unix(), UpdatedTime: &updatedAt, JobInfo: Job{ Title: "programmer",
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Fri Apr 21 14:09:38 GMT 2023 - 7.6K bytes - Viewed (0) -
callbacks/update.go
} else if field.AutoUpdateTime == schema.UnixSecond { set = append(set, clause.Assignment{Column: clause.Column{Name: field.DBName}, Value: now.Unix()}) } else { set = append(set, clause.Assignment{Column: clause.Column{Name: field.DBName}, Value: now}) } } } } } default: updatingSchema := stmt.Schema
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Mon Mar 18 05:44:55 GMT 2024 - 9.4K bytes - Viewed (1) -
schema/serializer.go
switch v := fieldValue.(type) { case int64, int, uint, uint64, int32, uint32, int16, uint16: result = time.Unix(reflect.Indirect(rv).Int(), 0).UTC() case *int64, *int, *uint, *uint64, *int32, *uint32, *int16, *uint16: if rv.IsZero() { return nil, nil } result = time.Unix(reflect.Indirect(rv).Int(), 0).UTC() default:
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Mon Mar 18 08:28:46 GMT 2024 - 4.6K bytes - Viewed (0) -
utils/utils_test.go
} }) } } type ModifyAt sql.NullTime // Value return a Unix time. func (n ModifyAt) Value() (driver.Value, error) { if !n.Valid { return nil, nil } return n.Time.Unix(), nil } func TestAssertEqual(t *testing.T) { now := time.Now() assertEqualTests := []struct { name string src, dst interface{}
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Mon Feb 19 03:42:25 GMT 2024 - 3.6K bytes - Viewed (0) -
schema/field.go
} else if field.AutoCreateTime == UnixMillisecond || field.AutoUpdateTime == UnixMillisecond { field.ReflectValueOf(ctx, value).SetInt(data.UnixMilli()) } else { field.ReflectValueOf(ctx, value).SetInt(data.Unix()) } case *time.Time: if data != nil { if field.AutoCreateTime == UnixNanosecond || field.AutoUpdateTime == UnixNanosecond { field.ReflectValueOf(ctx, value).SetInt(data.UnixNano())
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Mon Apr 15 03:20:20 GMT 2024 - 32K bytes - Viewed (1)