Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 31 for scwang (0.2 sec)

  1. src/bufio/scan_test.go

    		// Use a string range loop to validate the sequence of runes.
    		for i, expect = range test {
    			if !s.Scan() {
    				break
    			}
    			runeCount++
    			got, _ := utf8.DecodeRune(s.Bytes())
    			if got != expect {
    				t.Errorf("#%d: %d: expected %q got %q", n, i, expect, got)
    			}
    		}
    		if s.Scan() {
    			t.Errorf("#%d: scan ran too long, got %q", n, s.Text())
    		}
    		testRuneCount := utf8.RuneCountInString(test)
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Sep 22 16:22:42 GMT 2023
    - 14.3K bytes
    - Viewed (0)
  2. tests/sql_builder_test.go

    	DB.Save(&user1).Save(&user2).Save(&user3)
    
    	row := DB.Table("users").Where("name = ?", user2.Name).Select("age").Row()
    
    	var age int64
    	if err := row.Scan(&age); err != nil {
    		t.Fatalf("Failed to scan age, got %v", err)
    	}
    
    	if age != 10 {
    		t.Errorf("Scan with Row, age expects: %v, got %v", user2.Age, age)
    	}
    
    	table := "gorm.users"
    	if DB.Dialector.Name() != "mysql" || isTiDB() {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 16.7K bytes
    - Viewed (0)
  3. cmd/metacache-walk.go

    // WalkDirOptions provides options for WalkDir operations.
    type WalkDirOptions struct {
    	// Bucket to scanner
    	Bucket string
    
    	// Directory inside the bucket.
    	BaseDir string
    
    	// Do a full recursive scan.
    	Recursive bool
    
    	// ReportNotFound will return errFileNotFound if all disks reports the BaseDir cannot be found.
    	ReportNotFound bool
    
    	// FilterPrefix will only return results with given prefix within folder.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 15 08:25:46 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  4. schema/field.go

    							fieldValue.Set(reflect.New(field.FieldType.Elem()))
    						}
    
    						if valuer, ok := v.(driver.Valuer); ok {
    							v, _ = valuer.Value()
    						}
    
    						err = fieldValue.Interface().(sql.Scanner).Scan(v)
    					}
    					return
    				}
    			} else if _, ok := fieldValue.Interface().(sql.Scanner); ok {
    				// struct scanner
    				field.Set = func(ctx context.Context, value reflect.Value, v interface{}) (err error) {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 32K bytes
    - Viewed (1)
  5. internal/config/config.go

    type Config map[string]map[string]KVS
    
    // DelFrom - deletes all keys in the input reader.
    func (c Config) DelFrom(r io.Reader) error {
    	scanner := bufio.NewScanner(r)
    	for scanner.Scan() {
    		// Skip any empty lines, or comment like characters
    		text := scanner.Text()
    		if text == "" || strings.HasPrefix(text, KvComment) {
    			continue
    		}
    		if err := c.DelKVS(text); err != nil {
    			return err
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Mar 02 05:11:03 GMT 2024
    - 37.3K bytes
    - Viewed (0)
  6. cmd/metacache-set.go

    	// This will be used to persist the list.
    	ID string
    
    	// Bucket of the listing.
    	Bucket string
    
    	// Directory inside the bucket.
    	// When unset listPath will set this based on Prefix
    	BaseDir string
    
    	// Scan/return only content with prefix.
    	Prefix string
    
    	// FilterPrefix will return only results with this prefix when scanning.
    	// Should never contain a slash.
    	// Prefix should still be set.
    	FilterPrefix string
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 26 19:52:52 GMT 2024
    - 30.4K bytes
    - Viewed (0)
  7. src/bufio/scan.go

    	return s.err
    }
    
    // Bytes returns the most recent token generated by a call to [Scanner.Scan].
    // The underlying array may point to data that will be overwritten
    // by a subsequent call to Scan. It does no allocation.
    func (s *Scanner) Bytes() []byte {
    	return s.token
    }
    
    // Text returns the most recent token generated by a call to [Scanner.Scan]
    // as a newly allocated string holding its bytes.
    func (s *Scanner) Text() string {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Oct 23 09:06:30 GMT 2023
    - 14.2K bytes
    - Viewed (0)
  8. tests/scanner_valuer_test.go

    	// prepend asterisks
    	return append([]byte("***"), data...), nil
    }
    
    type Num int64
    
    func (i *Num) Scan(src interface{}) error {
    	switch s := src.(type) {
    	case []byte:
    		n, _ := strconv.Atoi(string(s))
    		*i = Num(n)
    	case int64:
    		*i = Num(s)
    	default:
    		return errors.New("Cannot scan NamedInt from " + reflect.ValueOf(src).String())
    	}
    	return nil
    }
    
    type StringsSlice []string
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Jun 07 07:02:07 GMT 2023
    - 10.6K bytes
    - Viewed (0)
  9. cmd/data-scanner.go

    	if i.debug {
    		if versionID != "" {
    			console.Debugf(applyActionsLogPrefix+" lifecycle: %q (version-id=%s), Initial scan: %v\n", i.objectPath(), versionID, lcEvt.Action)
    		} else {
    			console.Debugf(applyActionsLogPrefix+" lifecycle: %q Initial scan: %v\n", i.objectPath(), lcEvt.Action)
    		}
    	}
    
    	switch lcEvt.Action {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 22 17:49:30 GMT 2024
    - 47.4K bytes
    - Viewed (0)
  10. cmd/global-heal.go

    func healObject(bucket, object, versionID string, scan madmin.HealScanMode) error {
    	// Get background heal sequence to send elements to heal
    	bgSeq, ok := globalBackgroundHealState.getHealSequenceByToken(bgHealingUUID)
    	if ok {
    		return bgSeq.healObject(bucket, object, versionID, scan)
    	}
    	return nil
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 26 06:32:14 GMT 2024
    - 15K bytes
    - Viewed (1)
Back to top