- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 358 for setTypes (0.25 sec)
-
src/cmd/compile/internal/typecheck/expr.go
if t == nil || r.Type() == nil { n.SetType(nil) return n } switch t.Kind() { default: base.Errorf("invalid operation: %v (type %v does not support indexing)", n, t) n.SetType(nil) return n case types.TSTRING, types.TARRAY, types.TSLICE: n.Index = indexlit(n.Index) if t.IsString() { n.SetType(types.ByteType) } else { n.SetType(t.Elem()) } why := "string"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 14:29:45 UTC 2024 - 23.1K bytes - Viewed (0) -
cmd/metrics-v2_gen_test.go
bts := make([]byte, 0, v.Msgsize()) bts, _ = v.MarshalMsg(bts[0:0]) b.SetBytes(int64(len(bts))) b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { bts, _ = v.MarshalMsg(bts[0:0]) } } func BenchmarkUnmarshalMetricDescription(b *testing.B) { v := MetricDescription{} bts, _ := v.MarshalMsg(nil) b.ReportAllocs() b.SetBytes(int64(len(bts))) b.ResetTimer() for i := 0; i < b.N; i++ {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Sun Mar 10 09:15:15 UTC 2024 - 4.7K bytes - Viewed (0) -
src/crypto/internal/nistec/nistec_test.go
if _, err := nistec.NewP521Point().SetBytes(out); err != nil { t.Fatal(err) } out = p.BytesCompressed() if _, err := p.SetBytes(out); err != nil { t.Fatal(err) } }); allocs > 0 { t.Errorf("expected zero allocations, got %0.1f", allocs) } }) } type nistPoint[T any] interface { Bytes() []byte SetGenerator() T SetBytes([]byte) (T, error) Add(T, T) T Double(T) T
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 12 18:48:23 UTC 2023 - 8.4K bytes - Viewed (0) -
src/crypto/elliptic/nistec.go
byteLen := (curve.params.BitSize + 7) / 8 x = new(big.Int).SetBytes(data[1 : 1+byteLen]) y = new(big.Int).SetBytes(data[1+byteLen:]) return x, y } func (curve *nistCurve[Point]) UnmarshalCompressed(data []byte) (x, y *big.Int) { if len(data) == 0 || (data[0] != 2 && data[0] != 3) { return nil, nil } p, err := curve.newPoint().SetBytes(data) if err != nil { return nil, nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Nov 21 16:19:34 UTC 2022 - 9.6K bytes - Viewed (0) -
src/mime/type_test.go
} } func TestExtensionsByType(t *testing.T) { cleanup := setMimeInit(func() { clearMimeTypes() setType(".gif", "image/gif") setType(".a", "foo/letter") setType(".b", "foo/letter") setType(".B", "foo/letter") setType(".PNG", "image/png") }) defer cleanup() tests := []struct { typ string want []string wantErr string }{
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 08 21:09:03 UTC 2022 - 4.9K bytes - Viewed (0) -
src/crypto/internal/edwards25519/field/fe_test.go
} } func TestSetBytesRoundTrip(t *testing.T) { f1 := func(in [32]byte, fe Element) bool { fe.SetBytes(in[:]) // Mask the most significant bit as it's ignored by SetBytes. (Now // instead of earlier so we check the masking in SetBytes is working.) in[len(in)-1] &= (1 << 7) - 1 return bytes.Equal(in[:], fe.Bytes()) && isInBounds(&fe) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 28 17:26:17 UTC 2023 - 13.9K bytes - Viewed (0) -
cmd/site-replication-utils_gen_test.go
bts := make([]byte, 0, v.Msgsize()) bts, _ = v.MarshalMsg(bts[0:0]) b.SetBytes(int64(len(bts))) b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { bts, _ = v.MarshalMsg(bts[0:0]) } } func BenchmarkUnmarshalSiteResyncStatus(b *testing.B) { v := SiteResyncStatus{} bts, _ := v.MarshalMsg(nil) b.ReportAllocs() b.SetBytes(int64(len(bts))) b.ResetTimer() for i := 0; i < b.N; i++ {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Nov 14 15:16:40 UTC 2022 - 2.4K bytes - Viewed (0) -
cmd/metacache-set_gen_test.go
bts := make([]byte, 0, v.Msgsize()) bts, _ = v.MarshalMsg(bts[0:0]) b.SetBytes(int64(len(bts))) b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { bts, _ = v.MarshalMsg(bts[0:0]) } } func BenchmarkUnmarshallistPathOptions(b *testing.B) { v := listPathOptions{} bts, _ := v.MarshalMsg(nil) b.ReportAllocs() b.SetBytes(int64(len(bts))) b.ResetTimer() for i := 0; i < b.N; i++ {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Feb 19 22:54:46 UTC 2024 - 2.4K bytes - Viewed (0) -
cmd/metacache-walk_gen_test.go
bts := make([]byte, 0, v.Msgsize()) bts, _ = v.MarshalMsg(bts[0:0]) b.SetBytes(int64(len(bts))) b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { bts, _ = v.MarshalMsg(bts[0:0]) } } func BenchmarkUnmarshalWalkDirOptions(b *testing.B) { v := WalkDirOptions{} bts, _ := v.MarshalMsg(nil) b.ReportAllocs() b.SetBytes(int64(len(bts))) b.ResetTimer() for i := 0; i < b.N; i++ {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue Nov 21 01:09:35 UTC 2023 - 2.3K bytes - Viewed (0) -
cmd/bootstrap-peer-server_gen_test.go
bts := make([]byte, 0, v.Msgsize()) bts, _ = v.MarshalMsg(bts[0:0]) b.SetBytes(int64(len(bts))) b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { bts, _ = v.MarshalMsg(bts[0:0]) } } func BenchmarkUnmarshalServerSystemConfig(b *testing.B) { v := ServerSystemConfig{} bts, _ := v.MarshalMsg(nil) b.ReportAllocs() b.SetBytes(int64(len(bts))) b.ResetTimer() for i := 0; i < b.N; i++ {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Wed Jan 24 21:36:44 UTC 2024 - 2.4K bytes - Viewed (0)