- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 416 for elem1 (0.04 sec)
-
staging/src/k8s.io/apimachinery/pkg/util/cache/lruexpirecache_test.go
expectNotEntry(t, c, "elem2") expectEntry(t, c, "elem1", "1") expectEntry(t, c, "elem3", "3") expectEntry(t, c, "elem4", "4") expectEntry(t, c, "elem5", "5") } func TestLRUKeys(t *testing.T) { c := NewLRUExpireCache(4) c.Add("elem1", "1", 10*time.Hour) c.Add("elem2", "2", 10*time.Hour) c.Add("elem3", "3", 10*time.Hour) c.Add("elem4", "4", 10*time.Hour)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Nov 03 18:40:48 UTC 2023 - 4.3K bytes - Viewed (0) -
test/escape_reflect.go
v := reflect.ValueOf(x) // ERROR "x escapes to heap" return v.Slice(1, 2).Bytes() } func elem1(x *int) int { // ERROR "x does not escape" v := reflect.ValueOf(x) return int(v.Elem().Int()) } func elem2(x *string) string { // ERROR "leaking param: x to result ~r0 level=1" v := reflect.ValueOf(x) return string(v.Elem().String()) } type S struct { A int B *int C string }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 18:50:24 UTC 2023 - 13.1K bytes - Viewed (0) -
src/fmt/doc.go
pointer: %p For compound objects, the elements are printed using these rules, recursively, laid out like this: struct: {field0 field1 ...} array, slice: [elem0 elem1 ...] maps: map[key1:value1 key2:value2 ...] pointer to above: &{}, &[], &map[] Width is specified by an optional decimal number immediately preceding the verb.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 21:56:20 UTC 2024 - 14.6K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Sets.java
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Sun Jun 02 13:36:19 UTC 2024 - 77.3K bytes - Viewed (0) -
guava/src/com/google/common/collect/Sets.java
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Apr 01 16:15:01 UTC 2024 - 78.8K bytes - Viewed (0) -
src/encoding/gob/encoder_test.go
type Bug1Elem struct { Name string Id int } type Bug1StructMap map[string]Bug1Elem func TestMapBug1(t *testing.T) { in := make(Bug1StructMap) in["val1"] = Bug1Elem{"elem1", 1} in["val2"] = Bug1Elem{"elem2", 2} b := new(bytes.Buffer) enc := NewEncoder(b) err := enc.Encode(in) if err != nil { t.Fatal("encode:", err) } dec := NewDecoder(b) out := make(Bug1StructMap)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 29.7K bytes - Viewed (0) -
test/fixedbugs/issue17449.go
package master type PriorityList struct { elems []interface{} } func (x *PriorityList) Len() int { return len(x.elems) } func (l *PriorityList) remove(i int) interface{} { elem := l.elems[i] l.elems = append(l.elems[:i], l.elems[i+1:]...) return elem } func (l *PriorityList) Next() interface{} { return l.remove(l.Len() - 1) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:25 UTC 2023 - 1K bytes - Viewed (0) -
utils/utils_test.go
name string elems []string elem string out bool }{ {"exists", []string{"1", "2", "3"}, "1", true}, {"not exists", []string{"1", "2", "3"}, "4", false}, } for _, test := range containsTests { t.Run(test.name, func(t *testing.T) { if out := Contains(test.elems, test.elem); test.out != out { t.Errorf("Contains(%v, %s) want: %t, got: %t", test.elems, test.elem, test.out, out) } })
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Mon Feb 19 03:42:25 UTC 2024 - 3.6K bytes - Viewed (0) -
src/internal/abi/map.go
const ( // Maximum number of key/elem pairs a bucket can hold. MapBucketCountBits = 3 // log2 of number of elements in a bucket. MapBucketCount = 1 << MapBucketCountBits // Maximum key or elem size to keep inline (instead of mallocing per element). // Must fit in a uint8. // Note: fast map functions cannot handle big elems (bigger than MapMaxElemBytes). MapMaxKeyBytes = 128
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 22 20:09:01 UTC 2024 - 719 bytes - Viewed (0) -
utils/utils.go
if vv.IsValid() && !vv.IsZero() { results[idx] = fmt.Sprint(reflect.Indirect(vv).Interface()) } } } return strings.Join(results, "_") } func Contains(elems []string, elem string) bool { for _, e := range elems { if elem == e { return true } } return false } func AssertEqual(x, y interface{}) bool { if reflect.DeepEqual(x, y) { return true }
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Mon Apr 22 06:43:02 UTC 2024 - 3.8K bytes - Viewed (0)