- Sort Score
- Result 10 results
- Languages All
Results 121 - 130 of 1,431 for byte1 (0.03 sec)
-
tests/serializer_test.go
} type CustomSerializer struct { prefix []byte } func NewCustomSerializer(prefix string) *CustomSerializer { return &CustomSerializer{prefix: []byte(prefix)} } func (c *CustomSerializer) Scan(ctx context.Context, field *schema.Field, dst reflect.Value, dbValue interface{}) (err error) { switch value := dbValue.(type) { case []byte: err = field.Set(ctx, dst, bytes.TrimPrefix(value, c.prefix)) case string:
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Apr 21 14:09:38 UTC 2023 - 7.6K bytes - Viewed (0) -
cmd/dummy-data-generator_test.go
} return true, "" } func TestCmpReaders(t *testing.T) { { r1 := bytes.NewReader([]byte("abc")) r2 := bytes.NewReader([]byte("abc")) ok, msg := cmpReaders(r1, r2) if !(ok && msg == "") { t.Fatalf("unexpected") } } { r1 := bytes.NewReader([]byte("abc")) r2 := bytes.NewReader([]byte("abcd")) ok, _ := cmpReaders(r1, r2) if ok { t.Fatalf("unexpected") } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jul 02 15:13:05 UTC 2024 - 4.7K bytes - Viewed (0) -
internal/bucket/replication/datatypes_gen.go
return } return } // MarshalMsg implements msgp.Marshaler func (z StatusType) MarshalMsg(b []byte) (o []byte, err error) { o = msgp.Require(b, z.Msgsize()) o = msgp.AppendString(o, string(z)) return } // UnmarshalMsg implements msgp.Unmarshaler func (z *StatusType) UnmarshalMsg(bts []byte) (o []byte, err error) { { var zb0001 string zb0001, bts, err = msgp.ReadStringBytes(bts) if err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Mar 08 19:08:18 UTC 2024 - 2.3K bytes - Viewed (0) -
internal/grid/types_test.go
b.Fatal(err) } } } func TestMarshalUnmarshalBytes(t *testing.T) { v := Bytes([]byte("abc123123123")) bts, err := v.MarshalMsg(nil) if err != nil { t.Fatal(err) } var v2 Bytes left, err := v2.UnmarshalMsg(bts) if err != nil { t.Fatal(err) } if len(left) != 0 { t.Errorf("%d bytes left over after UnmarshalMsg(): %q", len(left), left) } left, err = msgp.Skip(bts)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Nov 21 01:09:35 UTC 2023 - 3.7K bytes - Viewed (0) -
cmd/xl-storage_windows_test.go
package cmd import ( "bytes" "context" "fmt" "testing" ) // Test if various paths work as expected when converted to UNC form func TestUNCPaths(t *testing.T) { testCases := []struct { objName string pass bool }{ {"/abcdef", true}, {"/a/b/c/d/e/f/g", true}, {string(bytes.Repeat([]byte("界"), 85)), true}, // Each path component must be <= 255 bytes long.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Nov 29 06:35:16 UTC 2023 - 2.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/FilesTest.java
} public void testMap_readWrite() throws IOException { // Test data int size = 1024; byte[] expectedBytes = new byte[size]; byte[] bytes = newPreFilledByteArray(1024); // Setup File file = createTempFile(); Files.write(bytes, file); Random random = new Random(); random.nextBytes(expectedBytes); // Test
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 22.1K bytes - Viewed (0) -
internal/grid/msg_gen.go
func (z muxConnectError) MarshalMsg(b []byte) (o []byte, err error) { o = msgp.Require(b, z.Msgsize()) // map header, size 1 // string "Error" o = append(o, 0x81, 0xa5, 0x45, 0x72, 0x72, 0x6f, 0x72) o = msgp.AppendString(o, z.Error) return } // UnmarshalMsg implements msgp.Unmarshaler func (z *muxConnectError) UnmarshalMsg(bts []byte) (o []byte, err error) { var field []byte _ = field var zb0001 uint32
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Jul 25 21:07:21 UTC 2024 - 22.4K bytes - Viewed (0) -
cmd/metrics-v2_gen_test.go
t.Fatal(err) } left, err := v.UnmarshalMsg(bts) if err != nil { t.Fatal(err) } if len(left) > 0 { t.Errorf("%d bytes left over after UnmarshalMsg(): %q", len(left), left) } left, err = msgp.Skip(bts) if err != nil { t.Fatal(err) } if len(left) > 0 { t.Errorf("%d bytes left over after Skip(): %q", len(left), left) } } func BenchmarkMarshalMsgMetricDescription(b *testing.B) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Mar 10 09:15:15 UTC 2024 - 4.7K bytes - Viewed (0) -
internal/config/identity/openid/jwks_test.go
t.Fatal("Key[0] is not using P-256 curve") } else if !bytes.Equal(key0.X.Bytes(), []byte{ 0x30, 0xa0, 0x42, 0x4c, 0xd2, 0x1c, 0x29, 0x44, 0x83, 0x8a, 0x2d, 0x75, 0xc9, 0x2b, 0x37, 0xe7, 0x6e, 0xa2, 0xd, 0x9f, 0x0, 0x89, 0x3a, 0x3b, 0x4e, 0xee, 0x8a, 0x3c, 0xa, 0xaf, 0xec, 0x3e, }) { t.Fatalf("Bad key[0].X, got %v", key0.X.Bytes()) } else if !bytes.Equal(key0.Y.Bytes(), []byte{ 0xe0, 0x4b, 0x65, 0xe9, 0x24,
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Jan 02 17:15:06 UTC 2022 - 9.8K bytes - Viewed (0) -
internal/config/crypto.go
// The context is bound to the returned ciphertext. // // The same context must be provided when decrypting the // ciphertext. func EncryptBytes(k *kms.KMS, plaintext []byte, context kms.Context) ([]byte, error) { ciphertext, err := Encrypt(k, bytes.NewReader(plaintext), context) if err != nil { return nil, err } return io.ReadAll(ciphertext) } // DecryptBytes decrypts the ciphertext using a key managed by the KMS.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue May 07 23:55:37 UTC 2024 - 5K bytes - Viewed (0)