Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 64 for Equals (0.2 sec)

  1. internal/s3select/sql/value.go

    	return
    }
    
    // ToString returns the value if string.
    func (v Value) ToString() (val string, ok bool) {
    	val, ok = v.value.(string)
    	return
    }
    
    // Equals returns whether the values strictly match.
    // Both type and value must match.
    func (v Value) Equals(b Value) (ok bool) {
    	if !v.SameTypeAs(b) {
    		return false
    	}
    	return reflect.DeepEqual(v.value, b.value)
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Feb 25 20:31:19 GMT 2022
    - 20.2K bytes
    - Viewed (0)
  2. cmd/erasure-metadata.go

    	for k, v := range m {
    		switch {
    		case equals(k, ReservedMetadataPrefixLower+ReplicationTimestamp):
    			d.ReplicaTimeStamp, _ = amztime.ParseReplicationTS(v)
    		case equals(k, ReservedMetadataPrefixLower+ReplicaTimestamp):
    			d.ReplicaTimeStamp, _ = amztime.ParseReplicationTS(v)
    		case equals(k, ReservedMetadataPrefixLower+ReplicaStatus):
    			d.ReplicaStatus = replication.StatusType(v)
    		case equals(k, ReservedMetadataPrefixLower+ReplicationStatus):
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 19.2K bytes
    - Viewed (1)
  3. internal/s3select/sql/value_test.go

    				wantOk: a.IsNull() && b.IsNull() && i == 0 && j == 0,
    			})
    		}
    	}
    	for _, tt := range tests {
    		t.Run(tt.name, func(t *testing.T) {
    			if gotOk := tt.fields.a.Equals(tt.fields.b); gotOk != tt.wantOk {
    				t.Errorf("Equals() = %v, want %v", gotOk, tt.wantOk)
    			}
    		})
    	}
    }
    
    func TestValue_CSVString(t *testing.T) {
    	type test struct {
    		name    string
    		want    string
    		wantAlt string
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Mar 06 16:56:10 GMT 2023
    - 12.5K bytes
    - Viewed (0)
  4. cmd/storage-datatypes.go

    func (fi FileInfo) ReadQuorum(dquorum int) int {
    	if fi.Deleted {
    		return dquorum
    	}
    	return fi.Erasure.DataBlocks
    }
    
    // Equals checks if fi(FileInfo) matches ofi(FileInfo)
    func (fi FileInfo) Equals(ofi FileInfo) (ok bool) {
    	typ1, ok1 := crypto.IsEncrypted(fi.Metadata)
    	typ2, ok2 := crypto.IsEncrypted(ofi.Metadata)
    	if ok1 != ok2 {
    		return false
    	}
    	if typ1 != typ2 {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 23 17:15:52 GMT 2024
    - 15.3K bytes
    - Viewed (0)
  5. internal/crypto/metadata_test.go

    		}
    		if !bytes.Equal(sealedKey.Key[:], test.SealedKey.Key[:]) {
    			t.Errorf("Test %d: got sealed key '%v' - want sealed key '%v'", i, sealedKey.Key, test.SealedKey.Key)
    		}
    		if !bytes.Equal(sealedKey.IV[:], test.SealedKey.IV[:]) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Feb 02 00:13:57 GMT 2024
    - 18.7K bytes
    - Viewed (0)
  6. cmd/data-usage_test.go

    		}
    	}
    }
    
    // equalAsJSON returns whether the values are equal when encoded as JSON.
    func equalAsJSON(a, b interface{}) bool {
    	aj, err := json.Marshal(a)
    	if err != nil {
    		panic(err)
    	}
    	bj, err := json.Marshal(b)
    	if err != nil {
    		panic(err)
    	}
    	return bytes.Equal(aj, bj)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Mar 27 15:10:40 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  7. internal/hash/reader_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    	if !bytes.Equal(r.MD5Current(), expectedMD5) {
    		t.Errorf("Expected md5hex \"e2fc714c4727ee9395f324cd2e7f331f\", got %s", hex.EncodeToString(r.MD5Current()))
    	}
    	expectedSHA256, err := hex.DecodeString("88d4266fd4e6338d13b845fcf289579d209c897823b9217da3e161936f031589")
    	if err != nil {
    		t.Fatal(err)
    	}
    	if !bytes.Equal(r.SHA256(), expectedSHA256) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 18 17:00:54 GMT 2023
    - 10.3K bytes
    - Viewed (0)
  8. docs/debugging/xl-meta/main.go

    	if len(buf) <= 8 {
    		return payload, 0, 0, fmt.Errorf("xlMeta: no data")
    	}
    
    	if !bytes.Equal(buf[:4], xlHeader[:]) {
    		return payload, 0, 0, fmt.Errorf("xlMeta: unknown XLv2 header, expected %v, got %v", xlHeader[:4], buf[:4])
    	}
    
    	if bytes.Equal(buf[4:8], []byte("1   ")) {
    		// Set as 1,0.
    		major, minor = 1, 0
    	} else {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 24 17:56:22 GMT 2024
    - 20.2K bytes
    - Viewed (1)
  9. internal/jwt/parser.go

    	}
    
    	n, err := base64DecodeBytes(token[i+1:], *bufp)
    	if err != nil {
    		return err
    	}
    	borrow := signer.HashBorrower()
    	hasher := hmac.New(borrow.Borrow, key)
    	hasher.Write(token[:i])
    	if !hmac.Equal((*bufp)[:n], hasher.Sum(nil)) {
    		borrow.ReturnAll()
    		return jwtgo.ErrSignatureInvalid
    	}
    	borrow.ReturnAll()
    
    	if claims.AccessKey == "" && claims.Subject == "" {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue May 09 07:53:08 GMT 2023
    - 13.9K bytes
    - Viewed (0)
  10. internal/s3select/message.go

    //   - BytesReturned => Current number of bytes of records payload data returned by S3.
    //
    // For uncompressed files, BytesScanned and BytesProcessed are equal.
    //
    // Example:
    //
    // <?xml version="1.0" encoding="UTF-8"?>
    // <Progress>
    //
    //	<BytesScanned>512</BytesScanned>
    //	<BytesProcessed>1024</BytesProcessed>
    //	<BytesReturned>1024</BytesReturned>
    //
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Aug 30 15:26:43 GMT 2022
    - 15.2K bytes
    - Viewed (0)
Back to top