vendor/google.golang.org/protobuf/proto/doc.go
changeset 260 445e01aede7e
parent 256 6d9efbef00a9
equal deleted inserted replaced
259:db4911b0c721 260:445e01aede7e
     4 
     4 
     5 // Package proto provides functions operating on protocol buffer messages.
     5 // Package proto provides functions operating on protocol buffer messages.
     6 //
     6 //
     7 // For documentation on protocol buffers in general, see:
     7 // For documentation on protocol buffers in general, see:
     8 //
     8 //
     9 //   https://developers.google.com/protocol-buffers
     9 //	https://developers.google.com/protocol-buffers
    10 //
    10 //
    11 // For a tutorial on using protocol buffers with Go, see:
    11 // For a tutorial on using protocol buffers with Go, see:
    12 //
    12 //
    13 //   https://developers.google.com/protocol-buffers/docs/gotutorial
    13 //	https://developers.google.com/protocol-buffers/docs/gotutorial
    14 //
    14 //
    15 // For a guide to generated Go protocol buffer code, see:
    15 // For a guide to generated Go protocol buffer code, see:
    16 //
    16 //
    17 //   https://developers.google.com/protocol-buffers/docs/reference/go-generated
    17 //	https://developers.google.com/protocol-buffers/docs/reference/go-generated
    18 //
    18 //
    19 //
    19 // # Binary serialization
    20 // Binary serialization
       
    21 //
    20 //
    22 // This package contains functions to convert to and from the wire format,
    21 // This package contains functions to convert to and from the wire format,
    23 // an efficient binary serialization of protocol buffers.
    22 // an efficient binary serialization of protocol buffers.
    24 //
    23 //
    25 // • Size reports the size of a message in the wire format.
    24 // • Size reports the size of a message in the wire format.
    28 // The MarshalOptions type provides more control over wire marshaling.
    27 // The MarshalOptions type provides more control over wire marshaling.
    29 //
    28 //
    30 // • Unmarshal converts a message from the wire format.
    29 // • Unmarshal converts a message from the wire format.
    31 // The UnmarshalOptions type provides more control over wire unmarshaling.
    30 // The UnmarshalOptions type provides more control over wire unmarshaling.
    32 //
    31 //
    33 //
    32 // # Basic message operations
    34 // Basic message operations
       
    35 //
    33 //
    36 // • Clone makes a deep copy of a message.
    34 // • Clone makes a deep copy of a message.
    37 //
    35 //
    38 // • Merge merges the content of a message into another.
    36 // • Merge merges the content of a message into another.
    39 //
    37 //
    43 //
    41 //
    44 // • Reset clears the content of a message.
    42 // • Reset clears the content of a message.
    45 //
    43 //
    46 // • CheckInitialized reports whether all required fields in a message are set.
    44 // • CheckInitialized reports whether all required fields in a message are set.
    47 //
    45 //
    48 //
    46 // # Optional scalar constructors
    49 // Optional scalar constructors
       
    50 //
    47 //
    51 // The API for some generated messages represents optional scalar fields
    48 // The API for some generated messages represents optional scalar fields
    52 // as pointers to a value. For example, an optional string field has the
    49 // as pointers to a value. For example, an optional string field has the
    53 // Go type *string.
    50 // Go type *string.
    54 //
    51 //
    59 // Generated enum types usually have an Enum method which performs the
    56 // Generated enum types usually have an Enum method which performs the
    60 // same operation.
    57 // same operation.
    61 //
    58 //
    62 // Optional scalar fields are only supported in proto2.
    59 // Optional scalar fields are only supported in proto2.
    63 //
    60 //
    64 //
    61 // # Extension accessors
    65 // Extension accessors
       
    66 //
    62 //
    67 // • HasExtension, GetExtension, SetExtension, and ClearExtension
    63 // • HasExtension, GetExtension, SetExtension, and ClearExtension
    68 // access extension field values in a protocol buffer message.
    64 // access extension field values in a protocol buffer message.
    69 //
    65 //
    70 // Extension fields are only supported in proto2.
    66 // Extension fields are only supported in proto2.
    71 //
    67 //
    72 //
    68 // # Related packages
    73 // Related packages
       
    74 //
    69 //
    75 // • Package "google.golang.org/protobuf/encoding/protojson" converts messages to
    70 // • Package "google.golang.org/protobuf/encoding/protojson" converts messages to
    76 // and from JSON.
    71 // and from JSON.
    77 //
    72 //
    78 // • Package "google.golang.org/protobuf/encoding/prototext" converts messages to
    73 // • Package "google.golang.org/protobuf/encoding/prototext" converts messages to