Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for str1 (0.08 sec)

  1. src/encoding/gob/codec_test.go

    type String string
    
    type PtrInterfaceItem struct {
    	Str1 any // basic
    	Str2 any // derived
    }
    
    // We'll send pointers; should receive values.
    // Also check that we can register T but send *T.
    func TestInterfacePointer(t *testing.T) {
    	b := new(bytes.Buffer)
    	str1 := "howdy"
    	str2 := String("kiddo")
    	item1 := &PtrInterfaceItem{
    		&str1,
    		&str2,
    	}
    	// Register the type.
    	Register(str2)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Aug 19 23:03:14 UTC 2023
    - 36.9K bytes
    - Viewed (0)
  2. test/escape2.go

    }
    
    func (b *Buffer) baz() { // ERROR "b does not escape$"
    	b.str1 = b.str1[1:2] // ERROR "\(\*Buffer\).baz ignoring self-assignment in b.str1 = b.str1\[1:2\]$"
    	b.str1 = b.str2[1:2] // ERROR "\(\*Buffer\).baz ignoring self-assignment in b.str1 = b.str2\[1:2\]$"
    }
    
    func (b *Buffer) bat() { // ERROR "leaking param content: b$"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Dec 14 17:22:18 UTC 2023
    - 35.1K bytes
    - Viewed (0)
  3. test/escape2n.go

    }
    
    func (b *Buffer) baz() { // ERROR "b does not escape$"
    	b.str1 = b.str1[1:2] // ERROR "\(\*Buffer\).baz ignoring self-assignment in b.str1 = b.str1\[1:2\]$"
    	b.str1 = b.str2[1:2] // ERROR "\(\*Buffer\).baz ignoring self-assignment in b.str1 = b.str2\[1:2\]$"
    }
    
    func (b *Buffer) bat() { // ERROR "leaking param content: b$"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Dec 14 17:22:18 UTC 2023
    - 35.1K bytes
    - Viewed (0)
  4. src/expvar/expvar_test.go

    	m.Set("map1", &m1)
    	m1.Add("a", 1)
    	m1.Add("z", 2)
    	m.Set("map2", &m2)
    	for i := 0; i < 9; i++ {
    		m2.Add(strconv.Itoa(i), int64(i))
    	}
    	var s1, s2 String
    	m.Set("str1", &s1)
    	s1.Set("hello, world!")
    	m.Set("str2", &s2)
    	s2.Set("fizz buzz")
    	b.ResetTimer()
    
    	b.ReportAllocs()
    	for i := 0; i < b.N; i++ {
    		_ = m.String()
    	}
    }
    
    func BenchmarkRealworldExpvarUsage(b *testing.B) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:46:19 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  5. cmd/utils.go

    func lcpSuffix(strs []string) string {
    	return lcp(strs, false)
    }
    
    func lcp(strs []string, pre bool) string {
    	// short-circuit empty list
    	if len(strs) == 0 {
    		return ""
    	}
    	xfix := strs[0]
    	// short-circuit single-element list
    	if len(strs) == 1 {
    		return xfix
    	}
    	// compare first to rest
    	for _, str := range strs[1:] {
    		xfixl := len(xfix)
    		strl := len(str)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Jun 05 22:00:34 UTC 2024
    - 31.9K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/ssa/nilcheck_test.go

    			Valu("sb", OpSB, c.config.Types.Uintptr, 0, nil),
    			Goto("checkPtr")),
    		Bloc("checkPtr",
    			Valu("ptr1", OpLoad, ptrType, 0, nil, "sb", "mem"),
    			Valu("bool1", OpIsNonNil, c.config.Types.Bool, 0, nil, "ptr1"),
    			If("bool1", "secondCheck", "exit")),
    		Bloc("secondCheck",
    			Valu("bool2", OpIsNonNil, c.config.Types.Bool, 0, nil, "ptr1"),
    			If("bool2", "extra", "exit")),
    		Bloc("extra",
    			Goto("exit")),
    		Bloc("exit",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 23:34:11 UTC 2023
    - 12.3K bytes
    - Viewed (0)
  7. pkg/proxy/ipvs/ipset/ipset.go

    	}
    	memberMatcher := regexp.MustCompile(EntryMemberPattern)
    	list := memberMatcher.ReplaceAllString(string(out[:]), "")
    	strs := strings.Split(list, "\n")
    	results := make([]string, 0)
    	for i := range strs {
    		if len(strs[i]) > 0 {
    			results = append(results, strs[i])
    		}
    	}
    	return results, nil
    }
    
    // GetVersion returns the version string.
    func (runner *runner) GetVersion() (string, error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Dec 19 01:20:51 UTC 2023
    - 17.1K bytes
    - Viewed (0)
  8. security/pkg/k8s/chiron/utils_test.go

    }
    
    // Get the server port from server.URL (e.g., https://127.0.0.1:36253)
    func getServerPort(server *httptest.Server) (int, error) {
    	strs := strings.Split(server.URL, ":")
    	if len(strs) < 2 {
    		return 0, fmt.Errorf("server.URL is invalid: %v", server.URL)
    	}
    	port, err := strconv.Atoi(strs[len(strs)-1])
    	if err != nil {
    		return 0, fmt.Errorf("error to extract port from URL: %v", server.URL)
    	}
    	return port, nil
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 15 03:58:11 UTC 2024
    - 13K bytes
    - Viewed (0)
  9. src/internal/profile/encode.go

    	encodeInt64Opt(b, 1, p.keyX)
    	encodeInt64Opt(b, 2, p.strX)
    	encodeInt64Opt(b, 3, p.numX)
    }
    
    var labelDecoder = []decoder{
    	nil, // 0
    	// optional int64 key = 1
    	func(b *buffer, m message) error { return decodeInt64(b, &m.(*Label).keyX) },
    	// optional int64 str = 2
    	func(b *buffer, m message) error { return decodeInt64(b, &m.(*Label).strX) },
    	// optional int64 num = 3
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Dec 07 19:52:28 UTC 2023
    - 13.6K bytes
    - Viewed (0)
  10. pkg/registry/core/pod/storage/storage_test.go

    			query:    "foo:12345",
    			location: expectedIP + ":12345",
    		},
    		{
    			pod: api.Pod{
    				ObjectMeta: metav1.ObjectMeta{Name: "foo"},
    				Spec: api.PodSpec{
    					Containers: []api.Container{
    						{Name: "ctr1"},
    						{Name: "ctr2", Ports: []api.ContainerPort{{ContainerPort: 9376}}},
    					},
    				},
    				Status: api.PodStatus{PodIPs: []api.PodIP{{IP: expectedIP}}},
    			},
    			query:    "foo",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 29 07:18:44 UTC 2024
    - 38.8K bytes
    - Viewed (0)
Back to top