- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 813 for u8marshal (0.11 sec)
-
src/encoding/json/decode_test.go
type ustructText struct { M unmarshalerText } // u8marshal is an integer type that can marshal/unmarshal itself. type u8marshal uint8 func (u8 u8marshal) MarshalText() ([]byte, error) { return []byte(fmt.Sprintf("u%d", u8)), nil } var errMissingU8Prefix = errors.New("missing 'u' prefix") func (u8 *u8marshal) UnmarshalText(b []byte) error { if !bytes.HasPrefix(b, []byte{'u'}) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 11 16:40:14 UTC 2024 - 67.6K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unmarshal/unmarshal.go
} // Classify the callee (without allocating memory). argidx := -1 recv := fn.Type().(*types.Signature).Recv() if fn.Name() == "Unmarshal" && recv == nil { // "encoding/json".Unmarshal // "encoding/xml".Unmarshal // "encoding/asn1".Unmarshal switch fn.Pkg().Path() { case "encoding/json", "encoding/xml", "encoding/asn1": argidx = 1 // func([]byte, interface{}) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 3.1K bytes - Viewed (0) -
pkg/util/protomarshal/protomarshal.go
strictUnmarshaler = jsonpb.Unmarshaler{} ) func Unmarshal(b []byte, m proto.Message) error { return strictUnmarshaler.Unmarshal(bytes.NewReader(b), legacyproto.MessageV1(m)) } func UnmarshalString(s string, m proto.Message) error { return Unmarshal([]byte(s), m) } func UnmarshalAllowUnknown(b []byte, m proto.Message) error { return unmarshaler.Unmarshal(bytes.NewReader(b), legacyproto.MessageV1(m)) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Mar 12 10:02:09 UTC 2024 - 6.6K bytes - Viewed (0) -
src/encoding/xml/marshal.go
const ( // Header is a generic XML header suitable for use with the output of [Marshal]. // This is not automatically added to any output of this package, // it is provided as a convenience. Header = `<?xml version="1.0" encoding="UTF-8"?>` + "\n" ) // Marshal returns the XML encoding of v. // // Marshal handles an array or slice by marshaling each of the elements. // Marshal handles a pointer by marshaling the value it points at or, if the
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 08 18:46:41 UTC 2024 - 31.2K bytes - Viewed (0) -
src/encoding/asn1/marshal.go
tag = *params.tag } t.tag = bytesEncoder(appendTagAndLength(t.scratch[:0], tagAndLength{class, tag, bodyLen, isCompound})) return t, nil } // Marshal returns the ASN.1 encoding of val. // // In addition to the struct tags recognized by Unmarshal, the following can be // used: // // ia5: causes strings to be marshaled as ASN.1, IA5String values // omitempty: causes empty slices to be skipped
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 17.1K bytes - Viewed (0) -
cmd/kubeadm/app/util/marshal.go
if !ok { return []byte{}, errors.Errorf("unsupported media type %q", mediaType) } encoder := codecs.EncoderForVersion(info.Serializer, gv) return runtime.Encode(encoder, obj) } // UniversalUnmarshal unmarshals YAML or JSON into a runtime.Object using the universal deserializer. func UniversalUnmarshal(buffer []byte) (runtime.Object, error) { codecs := clientsetscheme.Codecs decoder := codecs.UniversalDeserializer()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Feb 29 05:14:21 UTC 2024 - 5.8K bytes - Viewed (0) -
src/internal/chacha8rand/chacha8.go
break } s.Refill() } } s.Init64(seed) } // Marshal marshals the state into a byte slice. // Marshal and Unmarshal are functions, not methods, // so that they will not be linked into the runtime // when it uses the State struct, since the runtime // does not need these. func Marshal(s *State) []byte { data := make([]byte, 6*8) copy(data, "chacha8:")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 21:47:29 UTC 2024 - 4.4K bytes - Viewed (0) -
operator/pkg/util/yaml.go
ao, bo := make(map[string]any), make(map[string]any) if err := yaml.Unmarshal([]byte(a), &ao); err != nil { return err.Error() } if err := yaml.Unmarshal([]byte(b), &bo); err != nil { return err.Error() } ay, err := yaml.Marshal(ao) if err != nil { return err.Error() } by, err := yaml.Marshal(bo) if err != nil { return err.Error() }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Sat Jan 14 02:41:27 UTC 2023 - 7.2K bytes - Viewed (0) -
src/encoding/json/bench_test.go
var f float64 for pb.Next() { if err := Unmarshal(data, &f); err != nil { b.Fatalf("Unmarshal error: %v", err) } } }) } func BenchmarkUnmarshalInt64(b *testing.B) { b.ReportAllocs() data := []byte(`3`) b.RunParallel(func(pb *testing.PB) { var x int64 for pb.Next() { if err := Unmarshal(data, &x); err != nil { b.Fatalf("Unmarshal error: %v", err) } } }) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 15:00:17 UTC 2024 - 12.5K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_test.go
for _, c := range cases { input := c.input data, err := input.Marshal() if err != nil { t.Fatalf("Failed to marshal input: '%v': %v", input, err) } time := MicroTime{} if err := time.Unmarshal(data); err != nil { t.Fatalf("Failed to unmarshal output: '%v': %v", input, err) } if !reflect.DeepEqual(input, time) { t.Errorf("Marshal->Unmarshal is not idempotent: '%v' vs '%v'", input, time) } } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 21:48:10 UTC 2024 - 11.1K bytes - Viewed (0)