Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 32 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. src/cmd/vendor/golang.org/x/arch/arm64/arm64asm/plan9x.go

    				args[1] = fmt.Sprintf("$%s(SB)", s)
    			}
    		}
    	}
    
    	// Move addressing mode into opcode suffix.
    	suffix := ""
    	switch inst.Op {
    	case LDR, LDRB, LDRH, LDRSB, LDRSH, LDRSW, STR, STRB, STRH, STUR, STURB, STURH, LD1, ST1:
    		switch mem := inst.Args[1].(type) {
    		case MemImmediate:
    			switch mem.Mode {
    			case AddrOffset:
    				// no suffix
    			case AddrPreIndex:
    				suffix = ".W"
    			case AddrPostIndex, AddrPostReg:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 16 22:24:28 UTC 2022
    - 17K bytes
    - Viewed (0)
  8. 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)
  9. internal/s3select/sql/value.go

    		// float since we got here, so we convert.
    		flV, _ := v.ToFloat()
    		flA, _ := a.ToFloat()
    		return floatCompare(op, flV, flA), nil
    	}
    
    	strV, ok1s := v.ToString()
    	strA, ok2s := a.ToString()
    	if ok1s && ok2s {
    		return stringCompare(op, strV, strA), nil
    	}
    
    	boolV, ok1b := v.ToBool()
    	boolA, ok2b := a.ToBool()
    	if ok1b && ok2b {
    		return boolCompare(op, boolV, boolA)
    	}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Feb 25 20:31:19 UTC 2022
    - 20.2K bytes
    - Viewed (0)
  10. 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)
Back to top