- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 86 for addstr2 (0.28 sec)
-
test/escape2.go
s1 := s[0:1] sink = s1 // ERROR "s1 escapes to heap$" } func addstr0() { s0 := "a" s1 := "b" s := s0 + s1 // ERROR "s0 \+ s1 does not escape$" _ = s } func addstr1() { s0 := "a" s1 := "b" s := "c" s += s0 + s1 // ERROR "s0 \+ s1 does not escape$" _ = s } func addstr2() { b := make([]byte, 20) // ERROR "make\(\[\]byte, 20\) does not escape$"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Dec 14 17:22:18 UTC 2023 - 35.1K bytes - Viewed (0) -
test/escape2n.go
s1 := s[0:1] sink = s1 // ERROR "s1 escapes to heap$" } func addstr0() { s0 := "a" s1 := "b" s := s0 + s1 // ERROR "s0 \+ s1 does not escape$" _ = s } func addstr1() { s0 := "a" s1 := "b" s := "c" s += s0 + s1 // ERROR "s0 \+ s1 does not escape$" _ = s } func addstr2() { b := make([]byte, 20) // ERROR "make\(\[\]byte, 20\) does not escape$"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Dec 14 17:22:18 UTC 2023 - 35.1K bytes - Viewed (0) -
test/fixedbugs/issue19359.go
defer func() { if r := recover(); r != nil { err = fmt.Errorf("addInt failed: %v", r) } }() m[key] += 2018 return nil } func addStr(m map[interface{}]string, key interface{}) (err error) { defer func() { if r := recover(); r != nil { err = fmt.Errorf("addStr failed: %v", r) } }() m[key] += "hello, go" return nil } func appendInt(m map[interface{}][]int, key interface{}) (err error) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 20 01:47:07 UTC 2018 - 1.9K bytes - Viewed (0) -
pkg/config/analysis/analyzers/multicluster_analyzers_test.go
sa := local.NewIstiodAnalyzer(AllMultiClusterCombined(), "", "istio-system", cr) // Add the test files to the fake client if err := addStore(sa, "cluster1", tc.cluster1InputFiles); err != nil { return nil, err } if err := addStore(sa, "cluster2", tc.cluster2InputFiles); err != nil { return nil, err } // Include default resources if err := sa.AddDefaultResources(); err != nil {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Apr 02 08:32:06 UTC 2024 - 4.5K bytes - Viewed (0) -
src/net/packetconn_test.go
var packetConnTests = []struct { net string addr1 string addr2 string }{ {"udp", "127.0.0.1:0", "127.0.0.1:0"}, {"unixgram", testUnixAddr(t), testUnixAddr(t)}, } closer := func(c PacketConn, net, addr1, addr2 string) { c.Close() switch net { case "unixgram": os.Remove(addr1) os.Remove(addr2) } } for _, tt := range packetConnTests {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 18 17:20:52 UTC 2023 - 3K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go
addr1 := v1.UnsafeAddr() addr2 := v2.UnsafeAddr() if addr1 > addr2 { // Canonicalize order to reduce number of entries in visited. addr1, addr2 = addr2, addr1 } // Short circuit if references are identical ... if addr1 == addr2 { return true } // ... or already seen typ := v1.Type() v := visit{addr1, addr2, typ} if visited[v] { return true }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jul 20 17:18:42 UTC 2022 - 10.8K bytes - Viewed (0) -
src/runtime/pprof/protomem_test.go
"testing" ) func TestConvertMemProfile(t *testing.T) { addr1, addr2, map1, map2 := testPCs(t) // MemProfileRecord stacks are return PCs, so add one to the // addresses recorded in the "profile". The proto profile // locations are call PCs, so conversion will subtract one // from these and get back to addr1 and addr2. a1, a2 := uintptr(addr1)+1, uintptr(addr2)+1 rate := int64(512 * 1024) rec := []profilerecord.MemProfileRecord{
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 21 14:38:45 UTC 2024 - 6.7K bytes - Viewed (0) -
src/runtime/pprof/proto_test.go
map1, map2 = fake, fake } return } func TestConvertCPUProfile(t *testing.T) { addr1, addr2, map1, map2 := testPCs(t) b := []uint64{ 3, 0, 500, // hz = 500 5, 0, 10, uint64(addr1 + 1), uint64(addr1 + 2), // 10 samples in addr1 5, 0, 40, uint64(addr2 + 1), uint64(addr2 + 2), // 40 samples in addr2 5, 0, 10, uint64(addr1 + 1), uint64(addr1 + 2), // 10 samples in addr1 }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 31 23:21:53 UTC 2024 - 17K bytes - Viewed (0) -
src/net/resolverdialfunc_test.go
w.AddIP([16]byte{1: 1, 15: 15}) w.AddIP([16]byte{2: 2, 14: 14}) return nil }, HandleSRV: func(w SRVWriter, name string) error { w.AddSRV(1, 2, 80, "foo.bar.") w.AddSRV(2, 3, 81, "bar.baz.") return nil }, }), } ctx := context.Background() const fakeDomain = "something-that-is-a-not-a-real-domain.fake-tld." t.Run("LookupIP", func(t *testing.T) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 8.3K bytes - Viewed (0) -
src/runtime/closure_test.go
} func BenchmarkCallClosure3(b *testing.B) { for i := 0; i < b.N; i++ { ss = addr1(i) } } func addr2() (x int, p *int) { return 0, func() *int { return &x }() } func BenchmarkCallClosure4(b *testing.B) { for i := 0; i < b.N; i++ { _, ss = addr2() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 17 09:45:44 UTC 2020 - 937 bytes - Viewed (0)