- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 198 for Unmarshal (0.1 sec)
-
internal/store/queuestore.go
eventData, err = os.ReadFile(filepath.Join(store.directory, key.String())) if err != nil { return item, err } if len(eventData) == 0 { return item, os.ErrNotExist } if err = json.Unmarshal(eventData, &item); err != nil { return item, err } return item, nil } // GetMultiple will read the multi payload file and fetch the items
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 8.6K bytes - Viewed (0) -
tests/soft_delete_test.go
t.Errorf("Can't find permanently deleted record") } } func TestDeletedAtUnMarshal(t *testing.T) { expected := &gorm.Model{} b, _ := json.Marshal(expected) result := &gorm.Model{} _ = json.Unmarshal(b, result) if result.DeletedAt != expected.DeletedAt { t.Errorf("Failed, result.DeletedAt: %v is not same as expected.DeletedAt: %v", result.DeletedAt, expected.DeletedAt) } }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Feb 01 06:40:55 UTC 2023 - 5.7K bytes - Viewed (0) -
internal/config/policy/plugin/config.go
} // UnmarshalJSON - decodes JSON data. func (a *Args) UnmarshalJSON(data []byte) error { // subtype to avoid recursive call to UnmarshalJSON() type subArgs Args var so subArgs if err := json.Unmarshal(data, &so); err != nil { return err } oa := Args(so) if oa.URL == nil || oa.URL.String() == "" { *a = oa return nil } *a = oa return nil }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 5.8K bytes - Viewed (0) -
istioctl/pkg/workload/workload.go
// fake go-client used for mocking cannot.) func unstructureIstioType(spec any) (map[string]any, error) { b, err := yaml.Marshal(spec) if err != nil { return nil, err } iSpec := map[string]any{} err = yaml.Unmarshal(b, &iSpec) if err != nil { return nil, err } return iSpec, nil } func convertToUnsignedInt32Map(s []string) map[string]uint32 {
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Thu Aug 15 16:31:46 UTC 2024 - 25.3K bytes - Viewed (0) -
cmd/server-main.go
cfReader := bytes.NewReader(rd) cv := config.ServerConfigVersion{} if err = yaml.Unmarshal(rd, &cv); err != nil { return err } switch cv.Version { case "v1", "v2": default: return fmt.Errorf("unexpected version: %s", cv.Version) } cfCommon := config.ServerConfigCommon{} if err = yaml.Unmarshal(rd, &cfCommon); err != nil { return err } configCommonToSrvCtx(cfCommon, ctxt)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 24 21:50:11 UTC 2024 - 35.2K bytes - Viewed (1) -
docs/debugging/reorder-disks/main.go
} func getFormatJSON(path string) (format, error) { formatJSON, err := os.ReadFile(filepath.Join(path, ".minio.sys/format.json")) if err != nil { return format{}, err } var f format err = json.Unmarshal(formatJSON, &f) if err != nil { return format{}, err } return f, nil } func getDiskLocation(f format) (string, error) { for i, set := range f.XL.Sets { for j, disk := range set {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 5.4K bytes - Viewed (0) -
docs/debugging/inspect/main.go
input := struct { File string `json:"file"` Key string `json:"key"` }{} got, err := io.ReadAll(os.Stdin) if err != nil { fatalErr(err) } fatalErr(json.Unmarshal(got, &input)) inputs = []string{input.File} *keyHex = input.Key case len(flag.Args()) == 1: var err error inputs, err = filepathx.Glob(flag.Args()[0]) fatalErr(err) default: flag.Usage()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 31 14:49:23 UTC 2024 - 5.2K bytes - Viewed (0) -
istioctl/pkg/writer/envoy/clusters/clusters.go
failedOutlierCheck bool } // Prime loads the clusters output into the writer ready for printing func (c *ConfigWriter) Prime(b []byte) error { cd := clusters.Wrapper{} err := json.Unmarshal(b, &cd) if err != nil { return fmt.Errorf("error unmarshalling config dump response from Envoy: %v", err) } c.clusters = &cd return nil } func retrieveEndpointAddress(host *admin.HostStatus) string {
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Thu Nov 03 08:41:32 UTC 2022 - 5.8K bytes - Viewed (0) -
cmd/utils_test.go
type jsonResult struct { Method string `json:"method"` RequestURI string `json:"reqURI"` Header http.Header `json:"header"` } res := jsonResult{} if err = json.Unmarshal([]byte(strings.ReplaceAll(jsonReq, "%%", "%")), &res); err != nil { t.Fatal(err) } // Look for expected method. if res.Method != http.MethodGet { t.Fatalf("Unexpected method %s, expected 'GET'", res.Method)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Feb 23 21:28:14 UTC 2024 - 10.2K bytes - Viewed (0) -
cmd/bucket-lifecycle-handlers_test.go
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jun 10 15:50:49 UTC 2024 - 11.3K bytes - Viewed (0)