Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for 0123456789 (0.22 sec)

  1. src/archive/tar/writer_test.go

    						strings.Repeat("\x00", blockSize-100) + strings.Repeat("0123456789", 10),
    						int64(1e10 - blockSize),
    						strings.Repeat("\x00", blockSize-100) + strings.Repeat("0123456789", 10),
    						int64(1e10 - blockSize),
    						strings.Repeat("\x00", blockSize-100) + strings.Repeat("0123456789", 10),
    						int64(1e10 - blockSize),
    						strings.Repeat("\x00", blockSize-100) + strings.Repeat("0123456789", 10),
    						int64(1e10 - blockSize),
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Feb 27 16:39:23 GMT 2024
    - 38.7K bytes
    - Viewed (0)
  2. src/bytes/reader_test.go

    		wanterr any
    	}{
    		{0, 10, "0123456789", nil},
    		{1, 10, "123456789", io.EOF},
    		{1, 9, "123456789", nil},
    		{11, 10, "", io.EOF},
    		{0, 0, "", nil},
    		{-1, 0, "", "bytes.Reader.ReadAt: negative offset"},
    	}
    	for i, tt := range tests {
    		b := make([]byte, tt.n)
    		rn, err := r.ReadAt(b, tt.off)
    		got := string(b[:rn])
    		if got != tt.want {
    			t.Errorf("%d. got %q; want %q", i, got, tt.want)
    		}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Dec 13 18:45:54 GMT 2021
    - 8K bytes
    - Viewed (0)
  3. src/archive/tar/strconv.go

    	if err != nil {
    		return time.Time{}, ErrHeader
    	}
    	if len(sn) == 0 {
    		return time.Unix(secs, 0), nil // No sub-second values
    	}
    
    	// Parse the nanoseconds.
    	if strings.Trim(sn, "0123456789") != "" {
    		return time.Time{}, ErrHeader
    	}
    	if len(sn) < maxNanoSecondDigits {
    		sn += strings.Repeat("0", maxNanoSecondDigits-len(sn)) // Right pad
    	} else {
    		sn = sn[:maxNanoSecondDigits] // Right truncate
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 01 14:28:42 GMT 2023
    - 9K bytes
    - Viewed (0)
  4. src/bytes/example_test.go

    	// Output:
    	// -gopher!
    	// "go-gopher!"
    	// go-gopher
    	// go-gopher!
    }
    
    func ExampleTrimLeft() {
    	fmt.Print(string(bytes.TrimLeft([]byte("453gopher8257"), "0123456789")))
    	// Output:
    	// gopher8257
    }
    
    func ExampleTrimLeftFunc() {
    	fmt.Println(string(bytes.TrimLeftFunc([]byte("go-gopher"), unicode.IsLetter)))
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
  5. src/archive/tar/strconv_test.go

    		{"032033\x00 ", 032033, true},
    		{"320330\x00 ", 0320330, true},
    		{"0000660\x00 ", 0660, true},
    		{"\x00 0000660\x00 ", 0660, true},
    		{"0123456789abcdef", 0, false},
    		{"0123456789\x00abcdef", 0, false},
    		{"01234567\x0089abcdef", 342391, true},
    		{"0123\x7e\x5f\x264123", 0, false},
    	}
    
    	for _, v := range vectors {
    		var p parser
    		got := p.parseNumeric([]byte(v.in))
    		ok := (p.err == nil)
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Feb 09 05:28:50 GMT 2021
    - 14K bytes
    - Viewed (0)
  6. src/archive/tar/reader_test.go

    			Format: FormatPAX,
    		}},
    	}, {
    		file: "testdata/trailing-slash.tar",
    		headers: []*Header{{
    			Typeflag: TypeDir,
    			Name:     strings.Repeat("123456789/", 30),
    			ModTime:  time.Unix(0, 0),
    			PAXRecords: map[string]string{
    				"path": strings.Repeat("123456789/", 30),
    			},
    			Format: FormatPAX,
    		}},
    	}}
    
    	for _, v := range vectors {
    		t.Run(path.Base(v.file), func(t *testing.T) {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Nov 21 21:14:38 GMT 2022
    - 47.1K bytes
    - Viewed (0)
  7. src/bufio/bufio_test.go

    		b.WriteString("56789012")   // longer than BufSize
    		tw.check(t, "12345678", "") // but not enough (after filling the partially-filled buffer)
    		b.Flush()
    		tw.check(t, "123456789012", "")
    	}
    	{
    		tw := &teststringwriter{}
    		b := NewWriterSize(tw, BufSize)
    		b.WriteString("123456789")   // long string, empty buffer:
    		tw.check(t, "", "123456789") // use WriteString
    	}
    	{
    		tw := &teststringwriter{}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Feb 10 18:56:01 GMT 2023
    - 51.5K bytes
    - Viewed (0)
  8. src/bytes/compare_test.go

    }
    
    func benchmarkCompareBytesBigUnaligned(b *testing.B, offset int) {
    	b.StopTimer()
    	b1 := make([]byte, 0, 1<<20)
    	for len(b1) < 1<<20 {
    		b1 = append(b1, "Hello Gophers!"...)
    	}
    	b2 := append([]byte("12345678")[:offset], b1...)
    	b.StartTimer()
    	for j := 0; j < b.N; j++ {
    		if Compare(b1, b2[offset:]) != 0 {
    			b.Fatal("b1 != b2")
    		}
    	}
    	b.SetBytes(int64(len(b1)))
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Jul 13 23:11:42 GMT 2023
    - 6.8K bytes
    - Viewed (0)
  9. tests/sql_builder_test.go

    	if !regexp.MustCompile(`.*age.*=false,`).MatchString(sql) {
    		t.Errorf("Failed to generate sql, got %v", sql)
    	}
    
    	stmt = dryRunDB.Model(&user).Where("id = ?", 1).Updates(map[string]interface{}{"age": ageFloat(0.12345678)}).Statement
    	sql = DB.Dialector.Explain(stmt.SQL.String(), stmt.Vars...)
    	if !regexp.MustCompile(`.*age.*=0.123457,`).MatchString(sql) {
    		t.Errorf("Failed to generate sql, got %v", sql)
    	}
    }
    
    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)
  10. istioctl/pkg/describe/describe_test.go

    								Port:       80,
    								TargetPort: intstr.FromInt32(80),
    							},
    						},
    					},
    				},
    				&corev1.Pod{
    					ObjectMeta: metav1.ObjectMeta{
    						Name:      "productpage-v1-1234567890",
    						Namespace: "default",
    						Labels: map[string]string{
    							"app": "productpage",
    						},
    					},
    					Spec: corev1.PodSpec{
    						Containers: []corev1.Container{
    							{
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Thu Mar 28 09:54:01 GMT 2024
    - 30.4K bytes
    - Viewed (0)
Back to top