Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 190 for unmarshaler (0.25 sec)

  1. src/go/doc/comment/testdata/README.md

    “html” for Printer.HTML, “markdown” for Printer.Markdown, and “text” for Printer.Text.
    The format can also be “dump” for a textual dump of the raw data structures.
    
    The text before the `-- input --` line, if present, is JSON to be unmarshaled
    to initialize a comment.Printer. For example, this test case sets the Printer's
    TextWidth field to 20:
    
    	{"TextWidth": 20}
    	-- input --
    	Package gob manages streams of gobs - binary values exchanged between an
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  2. pilot/pkg/networking/core/fake.go

    	raw, _ := f.ConfigGen.BuildClusters(p, &model.PushRequest{Push: f.PushContext()})
    	res := make([]*cluster.Cluster, 0, len(raw))
    	for _, r := range raw {
    		c := &cluster.Cluster{}
    		if err := r.Resource.UnmarshalTo(c); err != nil {
    			f.t.Fatal(err)
    		}
    		res = append(res, c)
    	}
    	return res
    }
    
    func (f *ConfigGenTest) DeltaClusters(
    	p *model.Proxy,
    	configUpdated sets.Set[model.ConfigKey],
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  3. cni/pkg/util/pluginutil.go

    				return
    			}
    			errChan <- err
    		}
    	}
    }
    
    // Read CNI config from file and return the unmarshalled JSON as a map
    func ReadCNIConfigMap(path string) (map[string]any, error) {
    	cniConfig, err := os.ReadFile(path)
    	if err != nil {
    		return nil, err
    	}
    
    	var cniConfigMap map[string]any
    	if err = json.Unmarshal(cniConfig, &cniConfigMap); err != nil {
    		return nil, fmt.Errorf("%s: %w", path, err)
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jan 26 20:34:28 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  4. istioctl/pkg/util/configdump/wrapper.go

    }
    
    // Wrapper is a wrapper around the Envoy ConfigDump
    // It has extra helper functions for handling any/struct/marshal protobuf pain
    type Wrapper struct {
    	*admin.ConfigDump
    }
    
    // UnmarshalJSON is a custom unmarshaller to handle protobuf pain
    func (w *Wrapper) UnmarshalJSON(b []byte) error {
    	cd := &admin.ConfigDump{}
    	err := protomarshal.UnmarshalAllowUnknownWithAnyResolver(nonStrictResolver, b, cd)
    	*w = Wrapper{cd}
    	return err
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Apr 21 17:42:54 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  5. pkg/config/model.go

    	}
    	pbs := &structpb.Struct{}
    	if err := protomarshal.Unmarshal(js, pbs); err != nil {
    		return nil, err
    	}
    	return protoconv.MessageToAnyWithError(pbs)
    }
    
    func ToMap(s Spec) (map[string]any, error) {
    	js, err := ToJSON(s)
    	if err != nil {
    		return nil, err
    	}
    
    	// Unmarshal from json bytes to go map
    	var data map[string]any
    	err = json.Unmarshal(js, &data)
    	if err != nil {
    		return nil, err
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 29 15:31:09 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  6. src/cmd/go/internal/modinfo/info.go

    // UnmarshalJSON accepts both {"Err":"text"} and "text",
    // so that the output of go mod download -json can still
    // be unmarshaled into a ModulePublic during -reuse processing.
    func (e *ModuleError) UnmarshalJSON(data []byte) error {
    	if len(data) > 0 && data[0] == '"' {
    		return json.Unmarshal(data, &e.Err)
    	}
    	return json.Unmarshal(data, (*moduleErrorNoMethods)(e))
    }
    
    func (m *ModulePublic) String() string {
    	s := m.Path
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  7. pilot/pkg/xds/ecds_test.go

    			gotSecrets := sets.String{}
    			for _, res := range resources {
    				gotExtensions.Insert(res.Name)
    				ec := &core.TypedExtensionConfig{}
    				res.Resource.UnmarshalTo(ec)
    				wasm := &wasm.Wasm{}
    				ec.TypedConfig.UnmarshalTo(wasm)
    				gotsecret := wasm.GetConfig().GetVmConfig().GetEnvironmentVariables().GetKeyValues()[model.WasmSecretEnv]
    				if gotsecret != "" {
    					gotSecrets.Insert(gotsecret)
    				}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Mar 27 16:59:05 UTC 2024
    - 12K bytes
    - Viewed (0)
  8. src/syscall/dir_plan9.go

    	b = pstring(b, d.Gid)
    	b = pstring(b, d.Muid)
    
    	return n, nil
    }
    
    // UnmarshalDir decodes a single 9P stat message from b and returns the resulting Dir.
    //
    // If b is too small to hold a valid stat message, [ErrShortStat] is returned.
    //
    // If the stat message itself is invalid, [ErrBadStat] is returned.
    func UnmarshalDir(b []byte) (*Dir, error) {
    	if len(b) < STATFIXLEN {
    		return nil, ErrShortStat
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 19:32:38 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  9. src/os/dir_plan9.go

    		m := int(uint16(b[0])|uint16(b[1])<<8) + 2
    		if m < syscall.STATFIXLEN {
    			return names, dirents, infos, &PathError{Op: "readdir", Path: file.name, Err: syscall.ErrShortStat}
    		}
    
    		dir, err := syscall.UnmarshalDir(b[:m])
    		if err != nil {
    			return names, dirents, infos, &PathError{Op: "readdir", Path: file.name, Err: err}
    		}
    
    		if mode == readdirName {
    			names = append(names, dir.Name)
    		} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 20:52:06 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  10. src/encoding/xml/marshal.go

    	kind := val.Kind()
    	typ := val.Type()
    
    	// Check for marshaler.
    	if val.CanInterface() && typ.Implements(marshalerType) {
    		return p.marshalInterface(val.Interface().(Marshaler), defaultStart(typ, finfo, startTemplate))
    	}
    	if val.CanAddr() {
    		pv := val.Addr()
    		if pv.CanInterface() && pv.Type().Implements(marshalerType) {
    			return p.marshalInterface(pv.Interface().(Marshaler), defaultStart(pv.Type(), finfo, startTemplate))
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 18:46:41 UTC 2024
    - 31.2K bytes
    - Viewed (0)
Back to top