serial

package
v0.0.0-...-0871eb3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CodecDecode

func CodecDecode(sData string, tData interface{}) error

CodecDecode is decoder using github.com/ugorji/go/codec

func CodecEncode

func CodecEncode(data interface{}) []byte

CodecEncode is encoder using github.com/ugorji/go/codec

func FromGOB64

func FromGOB64(str string, tData interface{}) error

FromGOB64 is binary decoder

func RestoreFromFile

func RestoreFromFile(filepath string, data interface{}) error

RestoreFromFile is to restore data from file

func SaveToFile

func SaveToFile(filepath string, data interface{}) error

SaveToFile is to save object to file. data should be pointer.

func ToGOB64

func ToGOB64(data interface{}) (string, error)

ToGOB64 is binary encoder

Types

type Vector

type Vector struct {
	// contains filtered or unexported fields
}

Vector is vector

func (Vector) MarshalBinarys

func (v Vector) MarshalBinarys() ([]byte, error)

MarshalBinarys is to marshal binary

func (*Vector) UnmarshalBinarys

func (v *Vector) UnmarshalBinarys(data []byte) error

UnmarshalBinarys is to modifie the receiver so it must take a pointer receiver.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL