Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 32 for scwang (0.17 sec)

  1. tests/scan_test.go

    	if res.ID != user3.ID || res.Name != user3.Name || res.Age != int(user3.Age) {
    		t.Fatalf("Scan into struct should work, got %#v, should %#v", res, user3)
    	}
    
    	doubleAgeRes := &result{}
    	if err := DB.Table("users").Select("age + age as age").Where("id = ?", user3.ID).Scan(&doubleAgeRes).Error; err != nil {
    		t.Errorf("Scan to pointer of pointer")
    	}
    
    	if doubleAgeRes.Age != int(res.Age)*2 {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Sat May 28 14:18:07 GMT 2022
    - 8.2K bytes
    - Viewed (0)
  2. src/cmd/addr2line/main.go

    	defer f.Close()
    
    	tab, err := f.PCLineTable()
    	if err != nil {
    		log.Fatalf("reading %s: %v", flag.Arg(0), err)
    	}
    
    	stdin := bufio.NewScanner(os.Stdin)
    	stdout := bufio.NewWriter(os.Stdout)
    
    	for stdin.Scan() {
    		p := stdin.Text()
    		if strings.Contains(p, ":") {
    			// Reverse translate file:line to pc.
    			// This was an extension in the old C version of 'go tool addr2line'
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Apr 11 16:34:30 GMT 2022
    - 2.3K bytes
    - Viewed (0)
  3. cmd/metacache.go

    	"fmt"
    	"path"
    	"strings"
    	"time"
    )
    
    type scanStatus uint8
    
    const (
    	scanStateNone scanStatus = iota
    	scanStateStarted
    	scanStateSuccess
    	scanStateError
    
    	// Time in which the initiator of a scan must have reported back.
    	metacacheMaxRunningAge = time.Minute
    
    	// Max time between client calls before dropping an async cache listing.
    	metacacheMaxClientWait = 3 * time.Minute
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 5K bytes
    - Viewed (0)
  4. cmd/data-scanner-metric.go

    	scannerMetricHealAbandonedVersion
    
    	// START Trace metrics:
    	scannerMetricStartTrace
    	scannerMetricScanObject // Scan object. All operations included.
    	scannerMetricHealAbandonedObject
    
    	// END realtime metrics:
    	scannerMetricLastRealtime
    
    	// Trace only metrics:
    	scannerMetricScanFolder      // Scan a folder on disk, recursively.
    	scannerMetricScanCycle       // Full cycle, cluster global
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Sep 25 05:15:31 GMT 2023
    - 9.1K bytes
    - Viewed (0)
  5. internal/disk/directio_unsupported.go

    // reasons. Note that ZFS is effectively the default filesystem on illumos
    // systems.
    //
    // One benefit of using DirectIO on Linux is that the page cache will not be
    // polluted with single-access data. The ZFS read cache (ARC) is scan-resistant
    // so there is no risk of polluting the entire cache with data accessed once.
    // Another goal of DirectIO is to minimize the mutation of data by the kernel
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Oct 18 18:08:15 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  6. src/cmd/asm/internal/lex/tokenizer.go

    func (t *Tokenizer) Line() int {
    	return t.line
    }
    
    func (t *Tokenizer) Col() int {
    	return t.s.Pos().Column
    }
    
    func (t *Tokenizer) Next() ScanToken {
    	s := t.s
    	for {
    		t.tok = ScanToken(s.Scan())
    		if t.tok != scanner.Comment {
    			break
    		}
    		text := s.TokenText()
    		t.line += strings.Count(text, "\n")
    		if constraint.IsGoBuild(text) {
    			t.tok = BuildComment
    			break
    		}
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Aug 04 20:35:21 GMT 2022
    - 3K bytes
    - Viewed (0)
  7. tests/connection_test.go

    	if len(setSQL) == 0 || len(getSQL) == 0 {
    		return
    	}
    
    	err := DB.Connection(func(tx *gorm.DB) error {
    		if err := tx.Exec(setSQL, expectedName).Error; err != nil {
    			return err
    		}
    
    		if err := tx.Raw(getSQL).Scan(&actualName).Error; err != nil {
    			return err
    		}
    		return nil
    	})
    	if err != nil {
    		t.Errorf(fmt.Sprintf("WithSingleConnection should work, but got err %v", err))
    	}
    
    	if actualName != expectedName {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Jan 28 14:16:42 GMT 2022
    - 963 bytes
    - Viewed (0)
  8. interfaces.go

    type GetDBConnector interface {
    	GetDBConn() (*sql.DB, error)
    }
    
    // Rows rows interface
    type Rows interface {
    	Columns() ([]string, error)
    	ColumnTypes() ([]*sql.ColumnType, error)
    	Next() bool
    	Scan(dest ...interface{}) error
    	Err() error
    	Close() error
    }
    
    type ErrorTranslator interface {
    	Translate(err error) error
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Sat Aug 19 13:33:31 GMT 2023
    - 2.2K bytes
    - Viewed (0)
  9. tests/serializer_test.go

    	}
    	return s
    }
    
    type Roles []string
    
    type Job struct {
    	Title    string
    	Number   int
    	Location string
    	IsIntern bool
    }
    
    type EncryptedString string
    
    func (es *EncryptedString) Scan(ctx context.Context, field *schema.Field, dst reflect.Value, dbValue interface{}) (err error) {
    	switch value := dbValue.(type) {
    	case []byte:
    		*es = EncryptedString(bytes.TrimPrefix(value, []byte("hello")))
    	case string:
    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)
  10. cmd/streaming-v4-unsigned.go

    	wantTrailers := make(map[string]struct{}, len(cr.trailers))
    	for k := range cr.trailers {
    		wantTrailers[strings.ToLower(k)] = struct{}{}
    	}
    	input := bufio.NewScanner(bytes.NewReader(valueBuffer.Bytes()))
    	for input.Scan() {
    		line := strings.TrimSpace(input.Text())
    		if line == "" {
    			continue
    		}
    		// Find first separator.
    		idx := strings.IndexByte(line, trailerKVSeparator[0])
    		if idx <= 0 || idx >= len(line) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat May 06 02:53:12 GMT 2023
    - 6.1K bytes
    - Viewed (1)
Back to top