Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
41ac2f8a
Commit
41ac2f8a
authored
Oct 31, 2010
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gob: update documentation about wire format for interfaces.
R=rsc CC=golang-dev
https://golang.org/cl/2814041
parent
7f7cb166
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
doc.go
src/pkg/gob/doc.go
+6
-5
No files found.
src/pkg/gob/doc.go
View file @
41ac2f8a
...
...
@@ -130,11 +130,12 @@ Interface types are not checked for compatibility; all interface types are
treated, for transmission, as members of a single "interface" type, analogous to
int or []byte - in effect they're all treated as interface{}. Interface values
are transmitted as a string identifying the concrete type being sent (a name
that must be pre-defined by calling Register()), followed by the usual encoding
of concrete (dynamic) value stored in the interface value. (A nil interface
value is identified by the empty string and transmits no value.) Upon receipt,
the decoder verifies that the unpacked concrete item satisfies the interface of
the receiving variable.
that must be pre-defined by calling Register), followed by a byte count of the
length of the following data (so the value can be skipped if it cannot be
stored), followed by the usual encoding of concrete (dynamic) value stored in
the interface value. (A nil interface value is identified by the empty string
and transmits a zero-length value.) Upon receipt, the decoder verifies that the
unpacked concrete item satisfies the interface of the receiving variable.
The representation of types is described below. When a type is defined on a given
connection between an Encoder and Decoder, it is assigned a signed integer type
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment