- Sort Score
- Result 10 results
- Languages All
Results 361 - 370 of 938 for Nil (0.03 sec)
-
cmd/postpolicyform.go
} // toInteger _ Safely convert interface to integer without causing panic. func toInteger(val interface{}) (int64, error) { switch v := val.(type) { case float64: return int64(v), nil case int64: return v, nil case int: return int64(v), nil case string: i, err := strconv.Atoi(v) return int64(i), err default: return 0, errors.New("Invalid number format") } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 12.4K bytes - Viewed (0) -
tests/group_by_test.go
Age: 330, Birthday: Now(), Active: true, }} if err := DB.Create(&users).Error; err != nil { t.Errorf("errors happened when create: %v", err) } var name string var total int if err := DB.Model(&User{}).Select("name, sum(age)").Where("name = ?", "groupby").Group("name").Row().Scan(&name, &total); err != nil { t.Errorf("no error should happen, but got %v", err) } if name != "groupby" || total != 60 {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jan 06 07:02:53 UTC 2022 - 3.3K bytes - Viewed (0) -
internal/s3select/json/reader.go
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 3.2K bytes - Viewed (0) -
internal/http/check_port_test.go
err := CheckPortAvailability(testCase.host, strconv.Itoa(testCase.port), TCPOptions{}) switch { case testCase.expectedErr == nil: if err != nil { t.Fatalf("error: expected = <nil>, got = %v", err) } case err == nil: t.Fatalf("error: expected = %v, got = <nil>", testCase.expectedErr) case testCase.expectedErr.Error() != err.Error(): t.Fatalf("error: expected = %v, got = %v", testCase.expectedErr, err)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed May 03 21:12:25 UTC 2023 - 1.9K bytes - Viewed (0) -
cmd/utils.go
if err != nil { return nil, err } fn := filepath.Join(dirPath, "cpu.out") f, err := Create(fn) if err != nil { return nil, err } err = pprof.StartCPUProfile(f) if err != nil { return nil, err } prof.stopFn = func() ([]byte, error) { pprof.StopCPUProfile() err := f.Close() if err != nil { return nil, err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Aug 13 22:22:04 UTC 2024 - 31.9K bytes - Viewed (0) -
docs/sts/custom-token-identity.go
} // Initialize li, err := cr.NewCustomTokenCredentials(stsEndpoint, token, roleArn, opts...) if err != nil { log.Fatalf("Error initializing CustomToken Identity: %v", err) } v, err := li.Get() if err != nil { log.Fatalf("Error retrieving STS credentials: %v", err) } if displayCreds { fmt.Println("Only displaying credentials:")
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 27 00:58:09 UTC 2022 - 3.4K bytes - Viewed (0) -
internal/bucket/bandwidth/reader.go
type MonitorReaderOptions struct { BucketOptions HeaderSize int } // Read implements a throttled read func (r *MonitoredReader) Read(buf []byte) (n int, err error) { if r.throttle == nil { return r.r.Read(buf) } if r.lastErr != nil { err = r.lastErr return } b := r.throttle.Burst() // maximum available tokens need := len(buf) // number of bytes requested by caller
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jul 12 14:57:31 UTC 2024 - 3.2K bytes - Viewed (0) -
cmd/storage-rest_test.go
// file not found error. {"foo", "yourobject", 0, nil, true}, } result := make([]byte, 100) for i, testCase := range testCases { result = result[testCase.offset:3] _, err := storage.ReadFile(context.Background(), testCase.volumeName, testCase.objectName, testCase.offset, result, nil) expectErr := (err != nil) if expectErr != testCase.expectErr {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 22 07:04:48 UTC 2024 - 11.5K bytes - Viewed (0) -
tests/associations_has_many_test.go
user := User{Name: "jinzhu", Languages: []Language{{Name: "EN"}}} if err := DB.Create(&user).Error; err != nil { t.Fatalf("errors happened when create: %v", err) } if err := DB.Model(&user).Association("Languages").Replace(Language{Name: "DE"}, Language{Name: "FR"}); err == nil { t.Error("expected association error to be not nil") }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:49:45 UTC 2024 - 16K bytes - Viewed (0) -
tests/hooks_test.go
if err := DB.Create(&product).Error; err == nil { t.Errorf("should got failed to save, but error is nil") } if DB.First(&Product4{}, "name = ?", product.Name).Error == nil { t.Errorf("should got RecordNotFound, but got nil") } product = Product4{Name: "Product-2", Price: 100, Item: ProductItem{Code: "valid"}} if err := DB.Create(&product).Error; err != nil {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 17 03:59:06 UTC 2024 - 16.7K bytes - Viewed (0)