Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for str2 (0.06 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. 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)
  6. 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"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 16 22:24:28 UTC 2022
    - 17K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/ssa/nilcheck_test.go

    		Bloc("b1",
    			Valu("ptr1", OpAddr, ptrType, 0, nil, "sb"),
    			Goto("checkPtr")),
    		Bloc("b2",
    			Valu("ptr2", OpAddr, ptrType, 0, nil, "sb"),
    			Goto("checkPtr")),
    		// both ptr1 and ptr2 are guaranteed non-nil here
    		Bloc("checkPtr",
    			Valu("phi", OpPhi, ptrType, 0, nil, "ptr1", "ptr2"),
    			Valu("bool2", OpIsNonNil, c.config.Types.Bool, 0, nil, "phi"),
    			If("bool2", "extra", "exit")),
    		Bloc("extra",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 23:34:11 UTC 2023
    - 12.3K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/ssa/_gen/MIPS.rules

    (MOVWload [off] {sym} ptr (MOVWstore [off2] {sym2} ptr2 x _))  && sym == sym2 && off == off2 && isSamePtr(ptr, ptr2) => x
    (MOVFload [off] {sym} ptr (MOVFstore [off2] {sym2} ptr2 x _))  && sym == sym2 && off == off2 && isSamePtr(ptr, ptr2) => x
    (MOVDload [off] {sym} ptr (MOVDstore [off2] {sym2} ptr2 x _))  && sym == sym2 && off == off2 && isSamePtr(ptr, ptr2) => x
    
    // store zero
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 24 14:43:03 UTC 2023
    - 35.3K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/query-params-str-validations.md

        ```
    
    The query parameter `q` is of type `Union[str, None]` (or `str | None` in Python 3.10), that means that it's of type `str` but could also be `None`, and indeed, the default value is `None`, so FastAPI will know it's not required.
    
    !!! note
        FastAPI will know that the value of `q` is not required because of the default value `= None`.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri May 31 02:38:05 UTC 2024
    - 25.8K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/walk/assign.go

    		slice.SetType(s.Type())
    		slice.SetBounded(true)
    
    		ptr1, len1 := backingArrayPtrLen(cheapExpr(slice, &nodes))
    		ptr2, len2 := backingArrayPtrLen(l2)
    
    		fn := typecheck.LookupRuntime("slicecopy", ptr1.Type().Elem(), ptr2.Type().Elem())
    		ncopy = mkcall1(fn, types.Types[types.TINT], &nodes, ptr1, len1, ptr2, len2, ir.NewInt(base.Pos, elemtype.Size()))
    	} else {
    		// memmove(&s[idx], &l2[0], len(l2)*sizeof(T))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:09:06 UTC 2024
    - 20.3K bytes
    - Viewed (0)
Back to top