- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for mapLit (0.28 sec)
-
src/runtime/symtab_test.go
{"sliceLit[1]", sliceLit[1], 25}, {"sliceLit[2]", sliceLit[2], 25}, {"sliceLit[3]", sliceLit[3], 26}, {"mapLit[29]", mapLit[29], 29}, {"mapLit[30]", mapLit[30], 30}, {"mapLit[31]", mapLit[31+firstLine] + firstLine, 31}, // nb it's the key not the value {"mapLit[32]", mapLit[32+firstLine] + firstLine, 32}, // nb it's the key not the value {"intLit", intLit - 2*firstLine, 34 + 35 + 36},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 17 21:46:33 UTC 2022 - 7.5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/cel/common/maplist.go
*/ package common import ( "fmt" "strings" ) // MapList provides a "lookup by key" operation for lists (arrays) with x-kubernetes-list-type=map. type MapList interface { // Get returns the first element having given key, for all // x-kubernetes-list-map-keys, to the provided object. If the provided object isn't itself a valid MapList element, // get returns nil. Get(interface{}) interface{} }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Feb 07 02:56:51 UTC 2023 - 4.5K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/maplist.go
// keyedItems. If the provided schema is _not_ an array with x-kubernetes-list-type=map, returns an // empty mapList. func makeMapList(sts *schema.Structural, items []interface{}) (rv common.MapList) { return common.MakeMapList(&model.Structural{Structural: sts}, items)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Feb 07 02:56:51 UTC 2023 - 1.1K bytes - Viewed (0) -
test/typeparam/issue48716.dir/main.go
// Creates copy of set func Copy[T comparable](src MapSet[T]) (dst MapSet[T]) { dst = HashSet[T](src.Len()) Fill(src, dst) return } // Fill src from dst func Fill[T any](src, dst MapSet[T]) { src.Iterate(func(t T) bool { dst.Add(t) return true }) return } type MapSet[T any] struct { m a.Map[T, struct{}] } func HashSet[T comparable](capacity int) MapSet[T] {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 24 02:14:15 UTC 2022 - 1021 bytes - Viewed (0) -
test/typeparam/cons.go
type Cons[a any] struct { Head a Tail List[a] } func (xs Cons[a]) Match(casenil Function[Nil[a], any], casecons Function[Cons[a], any]) any { return casecons.Apply(xs) } type mapNil[a, b any] struct { } func (m mapNil[a, b]) Apply(_ Nil[a]) any { return Nil[b]{} } type mapCons[a, b any] struct { f Function[a, b] } func (m mapCons[a, b]) Apply(xs Cons[a]) any {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 21 23:41:49 UTC 2022 - 2K bytes - Viewed (0) -
src/testing/fstest/mapfs.go
} return n, nil } // A mapDir is a directory fs.File (so also an fs.ReadDirFile) open for reading. type mapDir struct { path string mapFileInfo entry []mapFileInfo offset int } func (d *mapDir) Stat() (fs.FileInfo, error) { return &d.mapFileInfo, nil } func (d *mapDir) Close() error { return nil } func (d *mapDir) Read(b []byte) (int, error) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 7.1K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/cel/openapi/maplist_test.go
"ki": int64(42), "ks": "hello", "v1": "b", }, }, } { t.Run(tc.name, func(t *testing.T) { mapList := MakeMapList(tc.sts, tc.items) for _, warmUp := range tc.warmUpQueries { mapList.Get(warmUp) } actual := mapList.Get(tc.query) if !reflect.DeepEqual(tc.expected, actual) { t.Errorf("got: %v, expected %v", actual, tc.expected) } }) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jan 11 18:08:11 UTC 2023 - 6.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/cel/common/equality.go
// Cached comparison result of DeepEqual of `value` and `thunk.oldValue` comparisonResult *bool // Cached map representation of a map-type list, or nil if not map-type list mapList MapList // Children spawned by a call to `Validate` on this object // key is either a string or an index, depending upon whether `value` is // a map or a list, respectively. //
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Oct 25 21:53:21 UTC 2023 - 9.1K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/maplist_test.go
"ki": int64(42), "ks": "hello", "v1": "b", }, }, } { t.Run(tc.name, func(t *testing.T) { mapList := makeMapList(&tc.sts, tc.items) for _, warmUp := range tc.warmUpQueries { mapList.Get(warmUp) } actual := mapList.Get(tc.query) if !reflect.DeepEqual(tc.expected, actual) { t.Errorf("got: %v, expected %v", actual, tc.expected) } }) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jan 11 18:08:11 UTC 2023 - 6.6K bytes - Viewed (0) -
src/compress/lzw/writer.go
func (w *Writer) Write(p []byte) (n int, err error) { if w.err != nil { return 0, w.err } if len(p) == 0 { return 0, nil } if maxLit := uint8(1<<w.litWidth - 1); maxLit != 0xff { for _, x := range p { if x > maxLit { w.err = errors.New("lzw: input byte too large for the litWidth") return 0, w.err } } } n = len(p) code := w.savedCode
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 13:32:40 UTC 2024 - 7.9K bytes - Viewed (0)