- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 27 for slicelen (0.51 sec)
-
test/typeparam/ordered.go
copy(s2, s) _OrderedSlice(s1) sorter(s2) ok := true if !sliceEq(s1, s2) { fmt.Printf("%s: got %v, want %v", name, s1, s2) ok = false } for i := len(s1) - 1; i > 0; i-- { if s1[i] < s1[i-1] { fmt.Printf("%s: element %d (%v) < element %d (%v)", name, i, s1[i], i-1, s1[i-1]) ok = false } } return ok } func sliceEq[Elem Ordered](s1, s2 []Elem) bool { for i, v1 := range s1 { v2 := s2[i]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 19:45:34 UTC 2022 - 2.2K bytes - Viewed (0) -
test/fixedbugs/issue8017.go
// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Issues 8017 and 8058: walk modifies nodes generated // by slicelit and causes an internal error afterwards // when gen_as_init parses it back. package main func F() { var ch chan int select { case <-ch:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 13:43:18 UTC 2016 - 540 bytes - Viewed (0) -
test/typeparam/sliceimp.dir/main.go
} func TestMin() { s1 := []int{1, 2, 3, -5} if got, want := a.SliceMin(s1), -5; got != want { panic(fmt.Sprintf("a.Min(%v) = %d, want %d", s1, got, want)) } s2 := []string{"aaa", "a", "aa", "aaaa"} if got, want := a.SliceMin(s2), "a"; got != want { panic(fmt.Sprintf("a.Min(%v) = %q, want %q", s2, got, want)) } if got, want := a.SliceMin(s2[:0]), ""; got != want {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 24 02:14:15 UTC 2022 - 4.6K bytes - Viewed (0) -
src/cmd/compile/internal/walk/complit.go
case ir.OSLICELIT: value := value.(*ir.CompLitExpr) if (kind == initKindStatic && ctxt == inNonInitFunction) || (kind == initKindDynamic && ctxt == inInitFunction) { var sinit ir.Nodes slicelit(ctxt, value, a, &sinit) if kind == initKindStatic { // When doing static initialization, init statements may contain dynamic // expression, which will be initialized later, causing liveness analysis
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 19:03:54 UTC 2023 - 19.5K bytes - Viewed (0) -
test/typeparam/sliceimp.dir/a.go
return zero } return Reduce(s[1:], s[0], Max[Elem]) } // Min returns the minimum element in a slice of some ordered type. // If the slice is empty it returns the zero value of the element type. func SliceMin[Elem Ordered](s []Elem) Elem { if len(s) == 0 { var zero Elem return zero } return Reduce(s[1:], s[0], Min[Elem]) } // Append adds values to the end of a slice, returning a new slice.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 30 01:55:58 UTC 2021 - 3.3K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/prove.go
// beginning of prove where we look for all len/cap ops. if v.Op == OpSliceLen && r< == 0 && ft.caps[v.Args[0].ID] != nil { // len(s) > w implies cap(s) > w // len(s) >= w implies cap(s) >= w // len(s) == w implies cap(s) >= w ft.update(parent, ft.caps[v.Args[0].ID], w, d, r|gt) } if w.Op == OpSliceLen && r> == 0 && ft.caps[w.Args[0].ID] != nil { // same, length on the RHS.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:30:21 UTC 2024 - 48.9K bytes - Viewed (0) -
pkg/proxy/endpointslicecache_test.go
tc.cache.checkoutChanges() } serviceKey, sliceKey, err := endpointSliceCacheKeys(tc.updatedSlice) if err != nil { t.Fatalf("Expected no error calling endpointSliceCacheKeys(): %v", err) } esData := &endpointSliceData{tc.updatedSlice, false} changed := tc.cache.esDataChanged(serviceKey, sliceKey, esData) if tc.expectChanged != changed {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Apr 29 21:07:21 UTC 2024 - 24.9K bytes - Viewed (0) -
src/cmd/cgo/internal/testcarchive/carchive_test.go
const ( magic = "!<arch>\n" fmag = "`\n" namelen = 16 datelen = 12 uidlen = 6 gidlen = 6 modelen = 8 sizelen = 10 fmaglen = 2 hdrlen = namelen + datelen + uidlen + gidlen + modelen + sizelen + fmaglen ) type arhdr struct { name string date string uid string gid string mode string size string fmag string }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 12 00:43:51 UTC 2023 - 34.8K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/loopbce.go
x = v.Args[0] y = v.Args[1] case OpAdd64, OpAdd32, OpAdd16, OpAdd8: x = v.Args[0] y = v.Args[1] if x.isGenericIntConst() { x, y = y, x } } switch x.Op { case OpSliceLen, OpStringLen, OpSliceCap: default: return nil, 0 } if y == nil { return x, 0 } if !y.isGenericIntConst() { return nil, 0 }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 07 17:37:47 UTC 2023 - 11.8K bytes - Viewed (0) -
docs/de/docs/tutorial/security/oauth2-jwt.md
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Mar 30 20:27:06 UTC 2024 - 15.1K bytes - Viewed (0)