- Sort Score
- Result 10 results
- Languages All
Results 131 - 140 of 947 for asSlice (0.16 sec)
-
src/text/template/exec_test.go
// Slicing. {"slice[:]", "{{slice .SI}}", "[3 4 5]", tVal, true}, {"slice[1:]", "{{slice .SI 1}}", "[4 5]", tVal, true}, {"slice[1:2]", "{{slice .SI 1 2}}", "[4]", tVal, true}, {"slice[-1:]", "{{slice .SI -1}}", "", tVal, false}, {"slice[1:-2]", "{{slice .SI 1 -2}}", "", tVal, false}, {"slice[1:2:-1]", "{{slice .SI 1 2 -1}}", "", tVal, false}, {"slice[2:1]", "{{slice .SI 2 1}}", "", tVal, false},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 24 22:23:55 UTC 2024 - 60.1K bytes - Viewed (0) -
src/slices/slices.go
func ContainsFunc[S ~[]E, E any](s S, f func(E) bool) bool { return IndexFunc(s, f) >= 0 } // Insert inserts the values v... into s at index i, // returning the modified slice. // The elements at s[i:] are shifted up to make room. // In the returned slice r, r[i] == v[0], // and r[i+len(v)] == value originally at r[i]. // Insert panics if i is out of range. // This function is O(len(s) + len(v)).
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 29 14:01:59 UTC 2024 - 13.6K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/ast/astutil/rewrite.go
i := c.Index() if i < 0 { panic("Delete node not contained in slice") } v := c.field() l := v.Len() reflect.Copy(v.Slice(i, l), v.Slice(i+1, l)) v.Index(l - 1).Set(reflect.Zero(v.Type().Elem())) v.SetLen(l - 1) c.iter.step-- } // InsertAfter inserts n after the current Node in its containing slice. // If the current Node is not part of a slice, InsertAfter panics. // Apply does not walk n.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 18 21:28:13 UTC 2023 - 12.2K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/authentication/request/x509/verify_options.go
} return StaticVerifierFn(opts), nil } // StringSliceProvider is a way to get a string slice value. It is heavily used for authentication headers among other places. type StringSliceProvider interface { // Value returns the current string slice. Callers should never mutate the returned value. Value() []string }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Nov 07 19:48:24 UTC 2019 - 2.2K bytes - Viewed (0) -
src/runtime/string.go
// string and byte slice both refer to the same storage. // The storage is not zeroed. Callers should use // b to set the string contents and then drop b. func rawstring(size int) (s string, b []byte) { p := mallocgc(uintptr(size), nil, false) return unsafe.String((*byte)(p), size), unsafe.Slice((*byte)(p), size) } // rawbyteslice allocates a new byte slice. The byte slice is not zeroed.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:17:26 UTC 2024 - 13.4K bytes - Viewed (0) -
src/go/doc/comment/testdata/doclink2.txt
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 11 16:31:42 UTC 2022 - 268 bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/cacher/caching_object.go
result.raw = buffer.Bytes() }) // Once invoked, fields of serialization will not change. if result.err != nil { return result.err } if b, support := w.(runtime.Splice); support { b.Splice(result.raw) return nil } _, err := w.Write(result.raw) return err } // GetObject implements runtime.CacheableObject interface.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jun 05 18:03:48 UTC 2023 - 12.6K bytes - Viewed (0) -
tests/associations_belongs_to_test.go
&Company{Name: "company-slice-append-1"}, &Company{Name: "company-slice-append-2"}, &Company{Name: "company-slice-append-3"}, ) AssertAssociationCount(t, users, "Company", 3, "After Append") DB.Model(&users).Association("Manager").Append( GetUser("manager-slice-belongs-to-1", Config{}), GetUser("manager-slice-belongs-to-2", Config{}), GetUser("manager-slice-belongs-to-3", Config{}), )
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Mon Oct 30 09:15:49 UTC 2023 - 9.3K bytes - Viewed (0) -
pkg/proxy/config/config_test.go
namespacedName := types.NamespacedName{Namespace: slice.Namespace, Name: slice.Name} h.state[namespacedName] = slice h.sendEndpointSlices() } func (h *EndpointSliceHandlerMock) OnEndpointSliceDelete(slice *discoveryv1.EndpointSlice) { h.lock.Lock() defer h.lock.Unlock() namespacedName := types.NamespacedName{Namespace: slice.Namespace, Name: slice.Name} delete(h.state, namespacedName) h.sendEndpointSlices() }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Apr 22 05:08:41 UTC 2024 - 14.3K bytes - Viewed (0) -
src/internal/types/testdata/check/go1_19_20.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Check Go language version-specific errors. //go:build go1.20 package p type Slice []byte type Array [8]byte var s Slice
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 14 16:08:31 UTC 2023 - 332 bytes - Viewed (0)