- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 76 for Unmarshal (0.05 sec)
-
internal/event/config_test.go
{[]byte(`<FilterRule><Name>suffix</Name><Value>foo/bar</Value></FilterRule>`), &FilterRule{"suffix", "foo/bar"}, false}, } for i, testCase := range testCases { result := &FilterRule{} err := xml.Unmarshal(testCase.data, result) expectErr := (err != nil) if expectErr != testCase.expectErr { t.Fatalf("test %v: error: expected: %v, got: %v", i+1, testCase.expectErr, expectErr) } if !testCase.expectErr {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Dec 05 10:16:33 UTC 2023 - 29K bytes - Viewed (0) -
tests/scanner_valuer_test.go
type StringsSlice []string func (l StringsSlice) Value() (driver.Value, error) { bytes, err := json.Marshal(l) return string(bytes), err } func (l *StringsSlice) Scan(input interface{}) error { switch value := input.(type) { case string: return json.Unmarshal([]byte(value), l) case []byte: return json.Unmarshal(value, l) default: return errors.New("not supported") } }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 07 07:02:07 UTC 2023 - 10.6K bytes - Viewed (0) -
internal/config/identity/openid/jwks_test.go
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Jan 02 17:15:06 UTC 2022 - 9.8K bytes - Viewed (0) -
cmd/xl-storage-format_test.go
} // Tests the correctness of constructing XLMetaV1 using jsoniter lib. // The result will be compared with the result obtained from json.unMarshal of the byte data. func TestGetXLMetaV1Jsoniter1(t *testing.T) { xlMetaJSON := getXLMetaBytes(1) var unMarshalXLMeta xlMetaV1Object if err := json.Unmarshal(xlMetaJSON, &unMarshalXLMeta); err != nil { t.Errorf("Unmarshalling failed: %v", err) } var jsoniterXLMeta xlMetaV1Object
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Feb 22 06:26:06 UTC 2024 - 17.6K bytes - Viewed (0) -
istioctl/pkg/writer/envoy/configdump/listener.go
} func getFilterType(filters []*listener.Filter) string { for _, filter := range filters { if filter.Name == HTTPListener { httpProxy := &hcm.HttpConnectionManager{} // Allow Unmarshal to work even if Envoy and istioctl are different filter.GetTypedConfig().TypeUrl = "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager"
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Wed Nov 29 12:37:14 UTC 2023 - 18.1K bytes - Viewed (0) -
cmd/format-erasure.go
for _, set := range f.Erasure.Sets { drives += len(set) } return drives } func (f *formatErasureV3) Clone() *formatErasureV3 { b, err := json.Marshal(f) if err != nil { panic(err) } var dst formatErasureV3 if err = json.Unmarshal(b, &dst); err != nil { panic(err) } return &dst } // Returns formatErasure.Erasure.Version
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 23.2K bytes - Viewed (0) -
internal/grid/types.go
} } } return } // JSONPool is a pool for JSON objects that unmarshal into T. type JSONPool[T any] struct { pool sync.Pool emptySz int } // NewJSONPool returns a new JSONPool. func NewJSONPool[T any]() *JSONPool[T] { var t T sz := 128 if b, err := json.Marshal(t); err != nil { sz = len(b) } return &JSONPool[T]{ pool: sync.Pool{
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 14 17:11:51 UTC 2024 - 15.5K bytes - Viewed (0) -
internal/jwt/parser.go
// StandardClaims are basically standard claims with "accessKey" type StandardClaims struct { AccessKey string `json:"accessKey,omitempty"` jwtgo.StandardClaims } // UnmarshalJSON provides custom JSON unmarshal. // This is mainly implemented for speed. func (c *StandardClaims) UnmarshalJSON(b []byte) (err error) { return jsonparser.ObjectEach(b, func(key []byte, value []byte, dataType jsonparser.ValueType, _ int) error {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 17 16:45:46 UTC 2024 - 14.1K bytes - Viewed (0) -
internal/event/name.go
return nil } // MarshalJSON - encodes to JSON data. func (name Name) MarshalJSON() ([]byte, error) { return json.Marshal(name.String()) } // UnmarshalJSON - decodes JSON data. func (name *Name) UnmarshalJSON(data []byte) error { var s string if err := json.Unmarshal(data, &s); err != nil { return err } eventName, err := ParseName(s) if err != nil { return err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed May 01 01:11:10 UTC 2024 - 10.4K bytes - Viewed (0) -
cmd/bucket-targets.go
if len(cmetadata) != 0 { if err := json.Unmarshal(cmetadata, &meta); err != nil { return nil, err } if crypto.S3.IsEncrypted(meta) { if data, err = decryptBucketMetadata(cdata, bucket, meta, kms.Context{ bucket: bucket, bucketTargetsFile: bucketTargetsFile, }); err != nil { return nil, err } } } if err = json.Unmarshal(data, &t); err != nil { return nil, err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jun 21 22:22:24 UTC 2024 - 20.9K bytes - Viewed (0)