gob

gob encoding is another type of binary encoding that is built into the standard library, and it's actually introduced by Go itself. It is a stream of data items, each one preceded by a type declaration, and it does not allow pointers. It uses their value, forbidding the use of nil pointers (since they have no value). The package also has problems with types that have pointers that create a recursive structure and this could lead to unwanted behaviors.

Numbers have arbitrary precision and they can be a float, signed, or unsigned. Signed integers can be stored in any signed integer type, unsigned integers into any unsigned integer type, and floating-point values may be received into any floating-point variable. However, if the variable can't represent the value (overflow, for instance), the decode will fail. Strings and byte slices are stored with a very efficient representation that tries to reuse the same underlying array. Structs will decode only the exported fields, so functions and channels will be ignored.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.134.76.72